firewall: emit hotplug events for interface add/remove
authorFelix Fietkau <nbd@openwrt.org>
Wed, 26 Aug 2009 22:46:24 +0000 (22:46 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 26 Aug 2009 22:46:24 +0000 (22:46 +0000)
SVN-Revision: 17415

package/firewall/files/uci_firewall.sh

index b71b25d..44dd48b 100755 (executable)
@@ -96,6 +96,7 @@ addif() {
        $IPTABLES -t raw -I PREROUTING 1 -i "$ifname" -j zone_${zone}_notrack
        uci_set_state firewall core "${network}_ifname" "$ifname"
        uci_set_state firewall core "${network}_zone" "$zone"
+       ACTION=add ZONE="$zone" INTERFACE="$network" DEVICE="$ifname" /sbin/hotplug-call firewall
 }
 
 delif() {
@@ -117,6 +118,7 @@ delif() {
        $IPTABLES -D forward -i "$ifname" -j zone_${zone}_forward
        uci_revert_state firewall core "${network}_ifname"
        uci_revert_state firewall core "${network}_zone"
+       ACTION=remove ZONE="$zone" INTERFACE="$network" DEVICE="$ifname" /sbin/hotplug-call firewall
 }
 
 load_synflood() {