Here comes the new UCI. Enjoy :)
[openwrt.git] / package / dnsmasq / files / dnsmasq.init
index 776dadd..62e2f51 100644 (file)
@@ -188,7 +188,8 @@ dhcp_add() {
        [ static = "$proto" ] || return 0
 
        config_get ipaddr "$net" ipaddr
-       config_get netmask "$net" netmask
+       config_get netmask "$cfg" netmask
+       [ -n "$netmask" ] || config_get netmask "$net" netmask
 
        #check for an already active dhcp server on the interface, unless 'force' is set
        config_get_bool force "$cfg" force 0
@@ -230,7 +231,6 @@ dhcp_option_add() {
 start() {
        include /lib/network
        scan_interfaces
-       config_load /var/state/network
        config_load dhcp
 
        args=""