Browse Source

Merge pull request #8319 from brianjmurrell/shorewall-iface-update

Shorewall: start and enable interfaces all in hotplug
lilik-openwrt-22.03
Hannu Nyman 6 years ago
committed by GitHub
parent
commit
de5efc91b3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 46 additions and 22 deletions
  1. +1
    -1
      net/shorewall-lite/Makefile
  2. +11
    -5
      net/shorewall-lite/files/hotplug_iface
  3. +1
    -1
      net/shorewall/Makefile
  4. +10
    -4
      net/shorewall/files/hotplug_iface
  5. +1
    -1
      net/shorewall6-lite/Makefile
  6. +11
    -5
      net/shorewall6-lite/files/hotplug_iface
  7. +1
    -1
      net/shorewall6/Makefile
  8. +10
    -4
      net/shorewall6/files/hotplug_iface

+ 1
- 1
net/shorewall-lite/Makefile View File

@ -14,7 +14,7 @@ PKG_BUGFIX_MAJOR_VERSION:=3
PKG_BUGFIX_MINOR_VERSION:=.2
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www1.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \


+ 11
- 5
net/shorewall-lite/files/hotplug_iface View File

@ -1,13 +1,19 @@
#!/bin/sh
# should restart shorewall when an interface comes up
DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
case "$ACTION" in
ifup)
/etc/init.d/shorewall-lite restart
if [ "$INTERFACE" = "lan" ]; then
/usr/sbin/shorewall -l start
elif [ "${INTERFACE:0:3}" = "wan" ] &&
[ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
/etc/shorewall-lite/state/firewall enable "$DEVICE"
fi
;;
ifdown)
# might need to restore some routing
/etc/init.d/shorewall-lite restart
if [ "${INTERFACE:0:3}" = "wan" ]; then
/etc/shorewall-lite/state/firewall disable "$DEVICE"
fi
;;
esac
esac

+ 1
- 1
net/shorewall/Makefile View File

@ -14,7 +14,7 @@ PKG_BUGFIX_MAJOR_VERSION:=3
PKG_BUGFIX_MINOR_VERSION:=.2
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www1.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \


+ 10
- 4
net/shorewall/files/hotplug_iface View File

@ -1,13 +1,19 @@
#!/bin/sh
# should restart shorewall when an interface comes up
DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
case "$ACTION" in
ifup)
/etc/init.d/shorewall restart
if [ "$INTERFACE" = "lan" ]; then
/usr/sbin/shorewall start
elif [ "${INTERFACE:0:3}" = "wan" ] &&
[ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
/etc/shorewall/state/firewall enable "$DEVICE"
fi
;;
ifdown)
# might need to restore some routing
/etc/init.d/shorewall restart
if [ "${INTERFACE:0:3}" = "wan" ]; then
/etc/shorewall/state/firewall disable "$DEVICE"
fi
;;
esac

+ 1
- 1
net/shorewall6-lite/Makefile View File

@ -14,7 +14,7 @@ PKG_BUGFIX_MAJOR_VERSION:=3
PKG_BUGFIX_MINOR_VERSION:=.2
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www1.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \


+ 11
- 5
net/shorewall6-lite/files/hotplug_iface View File

@ -1,13 +1,19 @@
#!/bin/sh
# should restart shorewall when an interface comes up
DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
case "$ACTION" in
ifup)
/etc/init.d/shorewall6-lite restart
if [ "$INTERFACE" = "lan" ]; then
/usr/sbin/shorewall -6 -l start
elif [ "${INTERFACE:0:3}" = "wan" ] &&
[ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
/etc/shorewall6-lite/state/firewall enable "$DEVICE"
fi
;;
ifdown)
# might need to restore some routing
/etc/init.d/shorewall6-lite restart
if [ "${INTERFACE:0:3}" = "wan" ]; then
/etc/shorewall6-lite/state/firewall disable "$DEVICE"
fi
;;
esac
esac

+ 1
- 1
net/shorewall6/Makefile View File

@ -14,7 +14,7 @@ PKG_BUGFIX_MAJOR_VERSION:=3
PKG_BUGFIX_MINOR_VERSION:=.2
PKG_VERSION:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)$(PKG_BUGFIX_MINOR_VERSION)
PKG_DIRECTORY:=$(PKG_MAJOR_MINOR_VERSION).$(PKG_BUGFIX_MAJOR_VERSION)
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE_URL:=http://www.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \
http://www1.shorewall.net/pub/shorewall/$(PKG_MAJOR_MINOR_VERSION)/shorewall-$(PKG_DIRECTORY)/ \


+ 10
- 4
net/shorewall6/files/hotplug_iface View File

@ -1,13 +1,19 @@
#!/bin/sh
# should restart shorewall when an interface comes up
DEVICE=${DEVICE:-$(/sbin/uci -p /var/state get network."$INTERFACE".ifname)}
case "$ACTION" in
ifup)
/etc/init.d/shorewall6 restart
if [ "$INTERFACE" = "lan" ]; then
/usr/sbin/shorewall -6 start
elif [ "${INTERFACE:0:3}" = "wan" ] &&
[ "${INTERFACE:$((${#INTERFACE}-2)):2}" != "_6" ]; then
/etc/shorewall6/state/firewall enable "$DEVICE"
fi
;;
ifdown)
# might need to restore some routing
/etc/init.d/shorewall6 restart
if [ "${INTERFACE:0:3}" = "wan" ]; then
/etc/shorewall6/state/firewall disable "$DEVICE"
fi
;;
esac

Loading…
Cancel
Save