1 . /lib/firewall/uci_firewall.sh
3 config_get ifname $INTERFACE ifname
4 [ "$ifname" == "lo" ] && exit 0
9 config_get name $1 name
10 config_get network $1 network
11 [ -z "$network" ] && network=$name
13 [ "$n" = "$INTERFACE" ] && ZONE="$ZONE $name"
17 config_foreach load_zones zone
19 [ -z "$ZONE" ] && exit 0
21 [ ifup = "$ACTION" ] && {
24 config_get loaded core loaded
25 [ -n "$loaded" ] && addif "$INTERFACE" "$ifname" "$z"
29 [ ifdown = "$ACTION" ] && {
31 config_get up "$INTERFACE" up
34 [ "$up" == "1" ] && delif "$INTERFACE" "$ifname" "$z"