dnsmasq: drop --interface and --except-interface options when the interface cannot...
[openwrt/openwrt.git] / package / network / services / dnsmasq / files / dnsmasq.init
index 4047768bba14449d06f3d1dd8dbc19842141d3c8..2b81a61bcc17c63fc5a86204c22b630babb20ed2 100644 (file)
@@ -119,12 +119,12 @@ append_ipset() {
 }
 
 append_interface() {
-       local ifname=$(uci_get_state network "$1" ifname "$1")
+       network_get_device ifname "$1" || return
        xappend "--interface=$ifname"
 }
 
 append_notinterface() {
-       local ifname=$(uci_get_state network "$1" ifname "$1")
+       network_get_device ifname "$1" || return
        xappend "--except-interface=$ifname"
 }