X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/e8be3016c98c2e7d81755c4eae34ea3c60f4b3f9..271da7f4e93492f377c0fcf25def4591d60b9fbc:/package/firewall/files/firewall.hotplug?ds=sidebyside diff --git a/package/firewall/files/firewall.hotplug b/package/firewall/files/firewall.hotplug index fa5643a2b..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_is_loaded || exit 0 + 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