aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/utils/comgt
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2018-11-14 12:49:45 +0100
committerKoen Vandeputte <koen.vandeputte@ncentric.com>2019-03-05 13:19:43 +0100
commit64bb88841fbc2d9a9dfee12775a18e5dc89ac16e (patch)
tree96c2dacf0a79e6b0fc189a301b5549be4c2c2c90 /package/network/utils/comgt
parentd3506d1bc160e4ce2833dff357f2a4b219772c77 (diff)
downloadupstream-64bb88841fbc2d9a9dfee12775a18e5dc89ac16e.tar.gz
upstream-64bb88841fbc2d9a9dfee12775a18e5dc89ac16e.tar.bz2
upstream-64bb88841fbc2d9a9dfee12775a18e5dc89ac16e.zip
uqmi: inherit firewall zone membership to virtual sub interfaces
Fix an issue where subinterfaces were not added to the same firewall zone as their parent. Fixes: FS#2122 Signed-off-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
Diffstat (limited to 'package/network/utils/comgt')
-rw-r--r--package/network/utils/comgt/files/ncm.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/package/network/utils/comgt/files/ncm.sh b/package/network/utils/comgt/files/ncm.sh
index 60b39655ec..9aaaa25f37 100644
--- a/package/network/utils/comgt/files/ncm.sh
+++ b/package/network/utils/comgt/files/ncm.sh
@@ -146,12 +146,18 @@ proto_ncm_setup() {
proto_close_data
proto_send_update "$interface"
+ local zone="$(fw3 -q network "$interface" 2>/dev/null)"
+
[ "$pdptype" = "IP" -o "$pdptype" = "IPV4V6" ] && {
json_init
json_add_string name "${interface}_4"
json_add_string ifname "@$interface"
json_add_string proto "dhcp"
proto_add_dynamic_defaults
+ [ -n "$zone" ] && {
+ json_add_string zone "$zone"
+ }
+ json_close_object
ubus call network add_dynamic "$(json_dump)"
}
@@ -162,6 +168,10 @@ proto_ncm_setup() {
json_add_string proto "dhcpv6"
json_add_string extendprefix 1
proto_add_dynamic_defaults
+ [ -n "$zone" ] && {
+ json_add_string zone "$zone"
+ }
+ json_close_object
ubus call network add_dynamic "$(json_dump)"
}