mirror of
https://github.com/openwrt/packages.git
synced 2026-05-31 06:51:51 +08:00
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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user