diff --git a/net/bsbf-openwrt-resources/Makefile b/net/bsbf-openwrt-resources/Makefile index 9cece8d8d6..7588b7f1f5 100644 --- a/net/bsbf-openwrt-resources/Makefile +++ b/net/bsbf-openwrt-resources/Makefile @@ -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 diff --git a/net/bsbf-openwrt-resources/files/etc/hotplug.d/net/99-bsbf-autoconf-cellular b/net/bsbf-openwrt-resources/files/etc/hotplug.d/net/99-bsbf-autoconf-cellular index da37783025..f4149b88d3 100644 --- a/net/bsbf-openwrt-resources/files/etc/hotplug.d/net/99-bsbf-autoconf-cellular +++ b/net/bsbf-openwrt-resources/files/etc/hotplug.d/net/99-bsbf-autoconf-cellular @@ -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 diff --git a/net/bsbf-openwrt-resources/files/etc/hotplug.d/net/99-bsbf-autoconf-dhcp b/net/bsbf-openwrt-resources/files/etc/hotplug.d/net/99-bsbf-autoconf-dhcp index 4b4c27d0a2..36ceee0742 100644 --- a/net/bsbf-openwrt-resources/files/etc/hotplug.d/net/99-bsbf-autoconf-dhcp +++ b/net/bsbf-openwrt-resources/files/etc/hotplug.d/net/99-bsbf-autoconf-dhcp @@ -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"