1 . /lib/firewall/uci_firewall.sh
3 config_get ifname $INTERFACE ifname
5 [ "$INTERFACE" == "lo" ] && exit 0
9 config_get name $1 name
10 config_get network $1 network
11 [ -z "$network" ] && network=$name
14 config_get ifname $n ifname
15 list_contains ifname $INTERFACE && {
16 list_contains ZONE $name || ZONE="$ZONE $name"
21 config_foreach load_zones zone
23 [ -z "$ZONE" ] && exit 0
25 [ ifup = "$ACTION" ] && {
28 config_get loaded core loaded
29 [ -n "$loaded" ] && addif $INTERFACE $z
33 [ ifdown = "$ACTION" ] && {
37 [ "$up" == "1" ] && delif $INTERFACE $z