dnsmasq: add interface-name uci list.
[openwrt/staging/mkresin.git] / package / network / services / dnsmasq / files / dnsmasq.init
index 3b801303b58813bd34a13215eae0e7f956521573..c742205321c346c010a42290f5e5ad94bcc86a5f 100644 (file)
@@ -142,6 +142,10 @@ append_pxe_service() {
        xappend "--pxe-service=$1"
 }
 
+append_interface_name() {
+       xappend "--interface-name=$1,$2"
+}
+
 filter_dnsmasq() {
        local cfg="$1" func="$2" match_cfg="$3" found_cfg
 
@@ -467,6 +471,8 @@ dhcp_add() {
        config_get ra_management "$cfg" ra_management
        config_get ra_preference "$cfg" ra_preference
 
+       config_list_foreach "$cfg" "interface_name" append_interface_name "$ifname"
+
        # Put the router host name on this DHCP served interface address(es)
        dhcp_this_host_add "$net" "$ifname" "$ADD_LOCAL_FQDN"