X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/2efc23f468eb5ec8a6793c6db67bf56a1bc090e8..9b5e9a5afbb63f073ed6b45b40c2b8258d41910d:/package/firewall/files/firewall.hotplug diff --git a/package/firewall/files/firewall.hotplug b/package/firewall/files/firewall.hotplug index e9d167b79..720b34cc8 100644 --- a/package/firewall/files/firewall.hotplug +++ b/package/firewall/files/firewall.hotplug @@ -3,17 +3,20 @@ # HOTPLUG_TYPE=iface, triggered by various scripts when an interface # is configured (ACTION=ifup) or deconfigured (ACTION=ifdown). The # interface is available as INTERFACE, the real device as DEVICE. -. /etc/functions.sh [ "$DEVICE" == "lo" ] && exit 0 +. /etc/functions.sh . /lib/firewall/core.sh + fw_init fw_is_loaded || exit 0 case "$ACTION" in ifup) - fw_configure_interface "$INTERFACE" add "$DEVICE" ;; + fw_configure_interface "$INTERFACE" add "$DEVICE" & + ;; ifdown) - fw_configure_interface "$INTERFACE" del "$DEVICE" ;; + fw_configure_interface "$INTERFACE" del "$DEVICE" + ;; esac