When restarting the networking subsystem (for example, by running 
"/etc/init.d/network restart"), I find that my WAN interface is brought up 
without an IP address or routing information applied.

I narrowed it down to the fact that the UDHCP script does not try to 
reconfigure the interface if all of the data (IP address, netmask, etc.) 
remains the same from the last time the DHCP client ran on the interface. While 
this is all well and good in the case of a DHCP renewal, it means that your 
newly-brought-up interface (which lost its IP config information when it went 
down as part of the restart) doesn't have its IP address applied.
I adjusted the script so that it actually configures the interface in the event 
that we are trying to bring it up ($1==ifup).
Or maybe someone knows of a better way to fix this?
Signed-off-by: Scott Dudley <[email protected]>
--- package/base-files/files/usr/share/udhcpc/default.script    (revision 
19503)+++ package/base-files/files/usr/share/udhcpc/default.script    (working 
copy)@@ -31,7 +31,8 @@                 config_get old_subnet    "$ifc" netmask  
       } -     [ "$ip" != "$old_ip" ] \+       [ "$1"=="ifup" ] \+     || [ 
"$ip" != "$old_ip" ] \     || [ "${broadcast:-+}" != "$old_broadcast" ] \  || [ 
"${subnet:-255.255.255.0}" != "$old_subnet" ] && {                 echo 
"udhcpc: ifconfig $interface $ip netmask ${subnet:-255.255.255.0} broadcast 
${broadcast:-+}"

                                          
_________________________________________________________________
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
http://clk.atdmt.com/GBL/go/201469226/direct/01/
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to