sulu-vendorext: fix missed heimgard.wan to genexis.wan renaming

Also add proper sanity checks so a catch-all ACCEPT rule cannot be
inadvertently added.
This commit is contained in:
Erik Karlsson 2025-09-30 11:36:45 +02:00
parent 3b6f88daed
commit 1fbf254b3a
2 changed files with 11 additions and 8 deletions

View file

@ -1,7 +1,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=sulu-vendorext
PKG_VERSION:=0.0.3
PKG_VERSION:=0.0.4
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

View file

@ -57,15 +57,18 @@ set_fwmode() {
case "$mode" in
low)
# add rule for incoming gateway
json_load "$(ubus call heimgard.wan status)"
json_init
json_load "$(ubus -S call genexis.wan status)"
json_get_var gateway gateway
if [ -n "$gateway" ]; then
uci set firewall.${allow_gw_rule}=rule
uci set firewall.${allow_gw_rule}.name='Allow-Gateway-In'
uci set firewall.${allow_gw_rule}.src='wan'
uci set firewall.${allow_gw_rule}.src_ip="$gateway"
uci set firewall.${allow_gw_rule}.target='ACCEPT'
uci reorder firewall.${allow_gw_rule}=1
fi
;;
medium)
uci set firewall.wan.input='DROP'