ppp: propagate master firewall zone to dynamic slave interface
[openwrt/openwrt.git] / package / network / services / ppp / files / lib / netifd / ppp6-up
old mode 100644 (file)
new mode 100755 (executable)
index 87ca63c..3852bf6
@@ -17,11 +17,16 @@ proto_send_update "$PPP_IPPARAM"
 }
 
 if [ -n "$AUTOIPV6" ]; then
+       ZONE=$(fw3 -q network $PPP_IPPARAM 2>/dev/null)
+
        json_init
        json_add_string name "${PPP_IPPARAM}_6"
        json_add_string ifname "@$PPP_IPPARAM"
        json_add_string proto "dhcpv6"
+       [ -n "$ZONE" ] && json_add_string zone "$ZONE"
        [ -n "$EXTENDPREFIX" ] && json_add_string extendprefix 1
+       [ -n "$IP6TABLE" ] && json_add_string ip6table $IP6TABLE
+       [ -n "$PEERDNS" ] && json_add_boolean peerdns $PEERDNS
        json_close_object
        ubus call network add_dynamic "$(json_dump)"
 fi