Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1614829 > unrolled thread

`iwlist scan` fails with many networks available

Started byJames Nylen <jnylen@gmail.com>
First post2017-04-02 23:50 +0200
Last post2017-04-02 23:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  `iwlist scan` fails with many networks available James Nylen <jnylen@gmail.com> - 2017-04-02 23:50 +0200

#1614829 — `iwlist scan` fails with many networks available

FromJames Nylen <jnylen@gmail.com>
Date2017-04-02 23:50 +0200
Subject`iwlist scan` fails with many networks available
Message-ID<trVxM-6aX-9@gated-at.bofh.it>

[Multipart message — attachments visible in raw view] — view raw

I've spent the past few days in a large hotel and noticed that `iwlist
scan` fails with the error message "Argument list too long".

This seems to be because there are a great many wireless networks in
my vicinity.  See:  https://bugzilla.kernel.org/show_bug.cgi?id=16384

Using `iw` as recommended in that ticket works, but it's not a great
option for me because `wicd` doesn't support it.

If I'm understanding the relevant code correctly, the attached patch
works around the issue by skipping networks that would not fit in the
scan-results buffer and returning partial results instead of just
erroring out.

This is the first time I've modified the kernel code directly.  I have
a couple of questions:

- This seems to be working like I intended, but the condition was a
bit hard to reproduce consistently.  Am I inadvertently breaking
things?
- Is there a better way to accomplish this?  Reading the `iwlist` code
I'm not entirely sure why this is occurring, because it looks like it
should be allocating a dynamic buffer length.

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web