-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
portable version of wsupp #1
Comments
It is certainly possible to rework wsupp so that it would use musl interfaces where appropriate. Just tried it quickly and maybe I will even get it working. It would still need large parts of lib/ bundled however because musl doesn't provide any NL code for instance. Chances are adding support for the arches Sabotage may need (i386 and PPC) will be easier than doing a proper port to musl. I've got a half-done i386 branch already, although it's a nasty target to deal with. Side note, musl doesn't really support "any" linux arch, that would be impossible. It's just that they have more entries in arch/ than minibase does.
Almost did it the same way in minibase. As long as the script is guaranteed to exit fast, this only requires rewriting wsupp_ifmon.c from what it is now to a simple fork-exec-wait sequence.
wsupp itself doesn't care how the links are set up, it's up to dhpc or whatever replaces dhcp. |
great!
right; but my preference is to use vanilla libc, so the code can be compiled on any linux system that has a libc (no matter if musl, uclibc, glibc, or even the buggy dietlibc ) i think your system-call layer is great for creating tiny statically linked programs, but not necessarily for regular applications. imo it'd be nice if one could switch it in and out using some define, e.g. #ifdef USE_MINILIBC
#include <minilibc.h>
#define open(...) sys_open(...)
...
right. is your NL code modeled after libnl ? we have libnl-tiny in sabotage: https://github.com/sabotage-linux/libnl-tiny
right, i actually meant: using libc, which in my case is musl. |
This won't work at all:
The relation between open() and sys_open() looks like this:
Note the presence of a global variable It doesn't really make much sense to bother with a custom base library if it were just a drop-in replacement for libc. I did exactly that for sninit, and I don't think it's worth repeating. Same goes for libnl, minibase code somewhat resembles the parts of libnl-tiny that aren't compatible with the full-size libnl.
You are trying to request a very abstract quality that you don't really need, but which comes with a hefty price for the project. Standard libc isn't magic, isn't pretty, is a bad dependency, and is a royal PITA to port or debug. |
Standalone version: https://github.com/arsv/wsupp-libc May be somewhat buggy at this point, I did not check it much. Note I left link-down logic there intact: if the link goes down and the cause is not rfkill, wsupp will exit. Typically this case is handled by link monitor of some sort. If you're not running any, it's probably not an issue for you. |
thanks a lot, this is a work of art. this version does support WPA1, right (unlike the demo/wpa program which explicitly mentions in its manpage that it doesnt) ? i hope to integrate it asap into sabotage |
Nope, none of them supports WPA1. |
what would be needed to support it ? only using RC4 instead of AES ? |
RC4, HMAC-MD5, a second set of IEs, mode selection and a bunch of if-s in wsupp_eapol.c, also probably some changes in |
do you plan to add support for WPA1 someday ? i can connect to WEP networks using vanilla iwconfig, but sometimes it's necessary to connect to WPA1 too. on a different topic, wsupp is now part of sabotage linux: dynamic:
static:
|
It wasn't planned, and I'm somewhat baffled by the request. WPA1 nowadays means a deliberately misconfigured AP, I don't think there are any valid reasons to run it. Anyway, I did plan to add support for non-encrypted (public) networks, which would require some of the changes needed for WPA1 anyway, so maybe I'll try to add WPA1 on top of that. |
do you never use someone else's wifi when you're travelling ? think internet cafe of some kind. i guess they wouldn't really get my point if i'd try to convince them that they need to get another AP :) |
Well yeah, but that's what I'd call misconfiguration. I would be really surprised to find a working AP that's hardware- or firmware-limited to WPA1 only. |
i've added support for the WPA1 version of AES CCMP to https://github.com/rofl0r/wpakey . the only difference is that the IE is using microsoft OUI, and the type field uses 254 (EAPOL_KEY_WPA) instead of 2. this is sufficient to connect to all WPA1 routers i've seen so far. |
Does it really connect? Did you try sending packets over the link, dhcp maybe? I don't think WPA1 allows CCMP, but I wouldn't be surprised to learn that hostapd accepts combinations that shouldn't be possible.
Missing Secure bit means link is not encrypted / key exchange is not complete. If possible, try to check how hostapd sees this exchange. With debug output enabled, it should clearly indicate when it's sending 1/4, 3/4 and so on. Works with Android too by the way if you've got |
i was lazy and quit upon receipt of M3, since i know by then that the password is correct. here's an example hostapd.conf
this is roughly equivalent to the WPA1 APs i've encountered so far (they do offer TKIP too, though). using wpakey, you can get the handshake till M3. |
hi! i'm really impressed by wsupp and would like to embed it into my musl-based distro sabotage linux because wpa_supplicant drives me crazy.
however, i want it to use vanilla musl libc so it's portable to any linux arch, not just the ones in your mini-libc. also, i would like to keep using the familiar tools ifconfig etc from busybox.
i do think that using musl would not make the binary considerably bigger, and opens the tool to a much bigger audience.
would you be willing to make such a portable version ?
btw, our approach to handling the dhclient / static IP stuff after connection is by calling an external script which creates a background task (so as not to block) and calls itself again.
https://github.com/sabotage-linux/sabotage/blob/master/KEEP/wpa_supplicant-action_script.patch
https://github.com/sabotage-linux/sabotage/blob/master/KEEP/etc/wpa_connect_action.sh#L33
i use the essid in the script to set different static ip or dhcp rule according to network name.
The text was updated successfully, but these errors were encountered: