Hey, I have been using the network profiles initscripts from testing for two weeks now, and have created a patch to fix some of the issues I have had with them.
My setup includes, 1 wireless card, 1 ethernet card. There are two wireless networks I frequent, a friend's and my school one. Frequently at school I will be in areas of low reception. At home I use ethernet. The first issue I found is that, if i stuck more than one wireless network into the NET_PROFILES line, unless i set the one i was needed to access as the last network, it would fail to connect to that network. This was because, as both wireless networks use eth1, it would connect fine, but then the scripts would try to connect to the second network, causing the scripts to take down the first connection. To fix this, the my patch includes a fix that prevents the network scripts from attempting to connect to a network on an interface, if a network is already connected, with an IP assigned. This means that it will go through all the wireless networks as it already does, in my NET_PROFILES and attempt to connect to them, one by one, until it succesfully connects to one. Upon succesfully connecting, it will not attempt to connect to any other networks on that interface. My second fix is to prevent the network scripts from attempting to get an IP address via dhcp on a wireless network that it has not even associated with yet. A wireless card cannot get an IP, unless it is associated (connected) with an Access Point. The main reason for doing this is that it causes a long, pointless delay on bootup, attempting to gain an IP on a network it is not connected to or has no access to. To fix that, i did a simple grep, for 00:00:00:00:00 which is the default Access Point shown by iwconfig, when a wireless card is not associated/connected. If it detects that is not connected, then it does not run dhcp. My third fix, is to help some connectivity issues some people may have. When I am in areas of low connectivity of an Access Point at school, my wireless card takes substantially longer to associate. Currently the network scripts, set the wireless settings with iwconfig, and attempt to get dhcp immediately. This method does not work, as often the wireless card has still not associated with an Access Point before the dhcp attempts to gain an IP. To fix that I added an extra configuration option, WIFI_WAIT, in the network profile. Rather than making it a static value in the netcfg, I decided that a config option would be much more suitable, as my friends network, where I always have good connectivity, associates almost immediately. Having the ten second delay I need at school for this network, adds a substantial amount of delay to my bootup. WIFI_WAIT is 5 seconds by default in the patched template included in the patch. Another suggestion is that, by default the network profile scripts arent bringing up lo, so maybe adding a loopback profile might be good, as no lo causes problems. I hope these help! I know bug fixes with patches are always better than those without, so I did my best to fix the listed problems. The fixes work for me, and I dont see any reason for them not to work for you. Comments are appreciated! Enjoy, James Rayner patch is in diff -Nau form, cd to / and patch -p1 < /path/to/network-improved.patch. patch is attatched, or available here. http://iphitus.loudas.com/arch/network/network-improved.patch -- iphitus - www.iphitus.tk
network-improved.patch
Description: Binary data
_______________________________________________ arch mailing list [email protected] http://www.archlinux.org/mailman/listinfo/arch
