bsbf-openwrt-resources: add network to firewall wan zone
authorChester A. Unal <redacted>
Mon, 11 May 2026 19:10:48 +0000 (20:10 +0100)
committerChester A. Unal <redacted>
Tue, 12 May 2026 07:01:35 +0000 (08:01 +0100)
Add the network entries that bsbf-autoconf-cellular and bsbf-autoconf-dhcp
create, to the firewall wan zone.

Signed-off-by: Chester A. Unal <redacted>
net/bsbf-openwrt-resources/Makefile
net/bsbf-openwrt-resources/files/etc/hotplug.d/net/99-bsbf-autoconf-cellular
net/bsbf-openwrt-resources/files/etc/hotplug.d/net/99-bsbf-autoconf-dhcp

index 9cece8d8d6e4e1eab8a65a5bde280a0bf011490d..7588b7f1f57d229db0c085444310b440021fbf6a 100644 (file)
@@ -4,7 +4,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=bsbf-openwrt-resources
-PKG_VERSION:=3
+PKG_VERSION:=4
 
 PKG_LICENSE:=AGPL-3.0-or-later
 PKG_MAINTAINER:=Chester A. Unal <chester.a.unal@arinc9.com>
index da3778302516908b23f62d75dc5118190e92339e..f4149b88d3446564b6b876217fabeadcd0fec062 100644 (file)
@@ -61,5 +61,11 @@ uci set network.wwan$index.proto="$cur_proto"
 uci set network.wwan$index.apn='internet'
 uci set network.wwan$index.peerdns='0'
 uci set network.wwan$index.metric="$metric"
-uci commit network
+
+# Add wwan network entry to firewall wan zone.
+fw_section=$(uci show firewall | grep "name='wan'" | cut -d. -f2)
+[ -n "$fw_section" ] && uci add_list firewall.$fw_section.network="wwan$index"
+
+uci commit
+service firewall reload
 ifup wwan$index
index 4b4c27d0a2605301ff38b18ad12c07bbea600c98..36ceee07428500e4f740a78db5f8e64132551f6e 100644 (file)
@@ -29,5 +29,11 @@ uci set network.wan_"$DEVICENAME".device="$DEVICENAME"
 uci set network.wan_"$DEVICENAME".proto='dhcp'
 uci set network.wan_"$DEVICENAME".peerdns='0'
 uci set network.wan_"$DEVICENAME".metric="$metric"
-uci commit network
+
+# Add wan network entry to firewall wan zone.
+fw_section=$(uci show firewall | grep "name='wan'" | cut -d. -f2)
+[ -n "$fw_section" ] && uci add_list firewall.$fw_section.network="wan_$DEVICENAME"
+
+uci commit
+service firewall reload
 ifup wan_"$DEVICENAME"
git clone https://git.99rst.org/PROJECT