Summary: | Baselayout, nasty bugs in parsing /etc/conf.d/wireless | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | tomas charvat <tc> |
Component: | [OLD] baselayout | Assignee: | Roy Marples (RETIRED) <uberlord> |
Status: | RESOLVED TEST-REQUEST | ||
Severity: | major | CC: | henrik |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | Apply user defaults on success |
Description
tomas charvat
2005-06-14 07:57:40 UTC
Try this iwpriv_wlan0="reset 0 reset 1 reset 2 maccmd 3 maccmd 4 maccmd 1 addmac 00:60:B3:6B:6F:25 addmac 00:60:B3:6D:79:99 addmac 00:60:B3:6E:10:E4" Basically, the last iwpriv_wlan0 statements overwrites all the others. (In reply to comment #1) > Try this > > iwpriv_wlan0="reset 0 reset 1 reset 2 maccmd 3 maccmd 4 maccmd 1 addmac > 00:60:B3:6B:6F:25 addmac 00:60:B3:6D:79:99 addmac 00:60:B3:6E:10:E4" > > Basically, the last iwpriv_wlan0 statements overwrites all the others. Waiting for Wireless Events from interfaces... 15:35:12.848251 wlan0 Set Encryption key:off 15:35:12.876728 wlan0 Set Encryption key:****-**** 15:35:13.028356 wlan0 Set Encryption key:off 15:35:13.062053 wlan0 Set ESSID:"bird" 15:35:13.134473 wlan0 Set Frequency=2.472 GHz (Channel 13) 15:35:13.169089 wlan0 Set Encryption key:****-**** 15:35:31.479683 wlan0 Tx packet dropped:00:60:B3:6B:6F:25 seems to me as same result. I forgot to mention, that i tried this before ;) Created attachment 61213 [details, diff]
Apply user defaults on success
Try this patch
(In reply to comment #3) > Created an attachment (id=61213) [edit] > Apply user defaults on success > > Try this patch shall patch /etc/init.d/net.wlan0 ? (In reply to comment #3) > Created an attachment (id=61213) [edit] > Apply user defaults on success > > Try this patch shall patch /etc/init.d/net.wlan0 ?(In reply to comment #3) > Created an attachment (id=61213) [edit] > Apply user defaults on success > > Try this patch Waiting for Wireless Events from interfaces... 19:06:01.908107 wlan0 Tx packet dropped:00:60:B3:6B:6F:25 19:06:12.737920 wlan0 Set Encryption key:off 19:06:12.771761 wlan0 Set Encryption key:****-**** 19:06:12.817045 wlan0 Set Encryption key:off 19:06:12.850257 wlan0 Set ESSID:"bird" 19:06:12.919406 wlan0 Set Frequency=2.472 GHz (Channel 13) 19:06:12.953150 wlan0 Set Encryption key:****-**** 19:06:13.025742 wlan0 Set Encryption key:****-**** Something is still wrong... specialy about setting encryption. i patched /lib/rcscripts/net.modules.d/iwconfig the iwconfig module is mainly for attaching to other networks - it appears that you are trying to add mac validation to it? Are you using hostapd? I suspect that you are as I found a post of yours on Google relating to this - infact it's the exact same script where you posted that it's unreliable unless done in this order. Well, my script is never going to do it in the order you want. However, you can do what you need like so predown() { if [[ $( type -t wireless_check_extensions ) == "function" ]]; then if wireless_check_extensions ${IFACE} ; then iwpriv ${IFACE} reset 0 iwpriv ${IFACE} reset 1 iwpriv ${IFACE} reset 2 fi fi } postup() { if [[ ${ESSID} == "bird" ]]; then iwpriv ${IFACE} maccmd 3 iwpriv ${IFACE} maccmd 4 iwpriv ${IFACE} maccmd 1 iwpriv ${IFACE} addmac 00:60:B3:6B:6F:25 iwpriv ${IFACE} addmac 00:60:B3:6D:79:99 iwpriv ${IFACE} addmac 00:60:B3:6E:10:E4 fi } So if i understand correctly, your script can handle only basic setup for wireless interface and if i wanna use some advanced setup i have to do in old way. Well ok. But there is still something wrong, when encryption is turn off/on/off/on. Even if i delete everything but essid, channel and mode i still see this. 11:53:46.890958 wlan0 Set Encryption key:off 11:53:46.935240 wlan0 Set Encryption key:off 11:53:46.968553 wlan0 Set ESSID:"bird" 11:53:47.035330 wlan0 Set Frequency=2.472 GHz (Channel 13) Why should be Encryption turned of twice, while i do not specify any additional iwconfig param nor iwpriv param. my wireless file was: essid_wlan0="bird" mode_wlan0="master" channel_wlan0="13" Something is wrong isnt it ? (In reply to comment #6) > the iwconfig module is mainly for attaching to other networks - it appears that > you are trying to add mac validation to it? Are you using hostapd? Yup its MAC validation. I use hostap driver but not Hostapd. > I suspect that you are as I found a post of yours on Google relating to this - > infact it's the exact same script where you posted that it's unreliable unless > done in this order. Well, my script is never going to do it in the order you want. Yeep if you are talking about order of my commands, it has to be done in that way. (turn on ACL, Flush Acl list, Kick all Clients, then we are adding valid clients) Umm well i will just keep old script and simply call it from net.wlan0 . you forgot key_bird="aaaa-bbbb" And yes, I do a few things more than once - this is to try and support every silly wireless driver. And lastly, this *is* an advanced wireless interface setup - it's not an Access Point setup which is what you're trying to accomplish. (In reply to comment #9) > you forgot > > key_bird="aaaa-bbbb" > > And yes, I do a few things more than once - this is to try and support every > silly wireless driver. > > And lastly, this *is* an advanced wireless interface setup - it's not an Access > Point setup which is what you're trying to accomplish. No i didnt forget encryoption key. I removed that encryption for testing. I made it as simple as possible, to show you that script play with encryption settings even if you do not specify any enc option. (if you do not setup ENC, script still attempt to turn of ENC 2x during interface startup) Well you probably didnt get it, coz of my crappy language. My driver is quite ok, it support WE(13 and later) w/o any problem. When i simply pass options via iwpriv/iwconfig commands it works fine. When your script trying to parse wireless configuration file, it do some things, whitch should not be done and it parse "only something" from /etc/conf.d/wireless. Would you be so kind and explain me, how is it related to my driver ? It is not possible to use this script for advanced setup, because it can not handle more that one non-standart iwpriv/iwconfig command. Instead of giving oportunity to user to setup their card by valid WE commands, functions, you just created some pseudo parameters (/etc/conf.d/wireless), whitch are parsed by init script and then interpreted to WE extension. Im not sure if this will help wireless users with setup of their network. They have to go trough another "private" labeling of functions and hope, that author consider their function as "normal". Your script is usefull just for client setup, insecure AP setup and some basic Monitor setup. Please note that Monitor,AP, IClient, AD-HOC are modes of 1 card, 1 driver. (no im not talking about hostap.. im talking about all drivers whitch support WE) I would rather suggest to spend time on script, whitch will be usefull interface for WE, that some limited sort of commands, whitch has been choosen by somebody. Does it make sense ? By drivers I mean all drivers not just your drivers for your card. There's code in there to make ndiswrapper, ratech and prism54 and play nicely with each other. Those drivers are all WE16 compliant and yet ndiswrapper sometimes does not support scanning, prism54 needs to be up before you can check if wireless works or not - just because they are WE compliant does not mean they work the same way. Hope that clears my driver comment up a bit! And yes, the script does alter encryption settings more than once. This is how it was designed to work as some drivers/cards require it to be removed before scanning works - yours may not but *some do*, hence that is why it does this. Basically if you set key_bird="aaaa-bbbb" and then run the script and it works then good. If - when the script has completed - iwconfig reports the correct key then it is good and does not matter how many times the script changed it. It only (or should only) matter how it ends up and not how it got there. Is the hostap-driver making those entires into syslog or are you using some other kind of wireless event logger? > Is the hostap-driver making those entires into syslog or are you using some
> other kind of wireless event logger?
Thanks for your explaining it made few things clear for me ;)
Output is from iwevent, whitch is part of wirelesstools.
I will try more tests with multiple parameters on one line.
I am unable to replicate those wireless events (monitored using iwevent) independantly of net.xxx on prism54 or madwifi which are the only wireless devices I have :( I'm going to have to leave this bug open util someone can fix it with the right hardware. baselayout-1.12.0_pre14 may fix this issue as it can now do seperate ipwriv calls, so this may work iwpriv_wlan0=( "reset 0" "reset 1" "reset 2" "maccmd 3" "maccmd 4" "maccmd 1" ) iwpriv_bird=( "addmac 00:60:B3:6B:6F:25" "addmac 00:60:B3:6D:79:99" "addmac 00:60:B3:6E:10:E4" ) |