dnsmasq: fix dhcp "ignore" option on wwan interfaces
[openwrt/openwrt.git] / package / network / services / dnsmasq / files / dnsmasq.init
index 6c83b2e5a0b34a9ba39035aad3676a1b9c45d171..0149643959761f46fa1e59ab8609c4e7f2c93a3f 100644 (file)
@@ -457,9 +457,7 @@ dhcp_add() {
        config_get networkid "$cfg" networkid
        [ -n "$networkid" ] || networkid="$net"
 
-       network_get_subnet subnet "$net" || return 0
        network_get_device ifname "$net" || return 0
-       network_get_protocol proto "$net" || return 0
 
        [ "$cachelocal" = "0" ] && network_get_dnsserver dnsserver "$net" && {
                DNS_SERVERS="$DNS_SERVERS $dnsserver"
@@ -471,6 +469,9 @@ dhcp_add() {
                return 0
        }
 
+       network_get_subnet subnet "$net" || return 0
+       network_get_protocol proto "$net" || return 0
+
        # Do not support non-static interfaces for now
        [ static = "$proto" ] || return 0