ppp: propagate master firewall zone to dynamic slave interface
authorHans Dedecker <dedeckeh@gmail.com>
Wed, 31 May 2017 14:24:11 +0000 (16:24 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Wed, 31 May 2017 14:49:59 +0000 (16:49 +0200)
Assign the virtual DHCPv6 interface the firewall zone of the parent interface
so fw3 knows the zone to which the virtual DHCPv6 interface belongs.
This guarantees the firewall settings are applied correctly for the virtual
DHCPv6 interface and allows to query the zone to which the virtual DHCPv6
interface belongs via the fw3 network option.

Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
package/network/services/ppp/Makefile
package/network/services/ppp/files/lib/netifd/ppp6-up

index 8b0daf22953f6c72b1ece888606fd0ce7eeaa6d6..6c615cab0b929f5035e782b568b47bbd5ca46a93 100644 (file)
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ppp
 PKG_VERSION:=2.4.7
-PKG_RELEASE:=11
+PKG_RELEASE:=12
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://download.samba.org/pub/ppp/
index 8ad03223e593161d4aca2925ced68a6c54e25aa3..3852bf63ffa2616d7bf1efe10f8468312a5a5f32 100755 (executable)
@@ -17,10 +17,13 @@ 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