local var="$1"
local item="$2"
- local val="$(uci_get_state firewall core $var)"
+ local val=" $(uci_get_state firewall core $var) "
+ val="${val// $item / }"
+ val="${val# }"
+ val="${val% }"
uci_set_state firewall core $var "${val:+$val }$item"
}
# Need v4 while zone is v6
*/*.*) fw_log info "zone $zone does not support IPv4 address family, skipping"; return ;;
+
+ # Strip prefix
+ *) mode="${mode#G}" ;;
esac
lock /var/run/firewall-interface.lock