bsbf-openwrt-resources: add network to firewall wan zone

Add the network entries that bsbf-autoconf-cellular and bsbf-autoconf-dhcp
create, to the firewall wan zone.

Signed-off-by: Chester A. Unal <chester.a.unal@arinc9.com>
This commit is contained in:
Chester A. Unal
2026-05-11 20:10:48 +01:00
parent 819342e694
commit 6d7476f2e0
3 changed files with 15 additions and 3 deletions
+1 -1
View 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>
@@ -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
@@ -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"