Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1614829 > unrolled thread
| Started by | James Nylen <jnylen@gmail.com> |
|---|---|
| First post | 2017-04-02 23:50 +0200 |
| Last post | 2017-04-02 23:50 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
`iwlist scan` fails with many networks available James Nylen <jnylen@gmail.com> - 2017-04-02 23:50 +0200
| From | James Nylen <jnylen@gmail.com> |
|---|---|
| Date | 2017-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.
Back to top | Article view | linux.kernel
csiph-web