Merge pull request #15171 from ldir-EDB0/miniupnpd
miniupnpd: add patience to firewall include
This commit is contained in:
commit
dca4bbaf99
2 changed files with 5 additions and 4 deletions
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=miniupnpd
|
PKG_NAME:=miniupnpd
|
||||||
PKG_VERSION:=2.2.1
|
PKG_VERSION:=2.2.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
|
PKG_SOURCE_URL:=https://miniupnp.tuxfamily.org/files
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# miniupnpd integration for firewall3
|
# miniupnpd integration for firewall3
|
||||||
|
|
||||||
IPTABLES=/usr/sbin/iptables
|
IPTABLES="/usr/sbin/iptables"
|
||||||
IP6TABLES=/usr/sbin/ip6tables
|
IP6TABLES="/usr/sbin/ip6tables"
|
||||||
|
IPTARGS="-w 1"
|
||||||
|
|
||||||
$IPTABLES -t filter -N MINIUPNPD 2>/dev/null
|
$IPTABLES -t filter -N MINIUPNPD 2>/dev/null
|
||||||
$IPTABLES -t nat -N MINIUPNPD 2>/dev/null
|
$IPTABLES -t nat -N MINIUPNPD 2>/dev/null
|
||||||
|
@ -19,7 +20,7 @@ iptables_prepend_rule() {
|
||||||
local chain="$3"
|
local chain="$3"
|
||||||
local target="$4"
|
local target="$4"
|
||||||
|
|
||||||
$iptables -t "$table" -I "$chain" $($iptables -t "$table" --line-numbers -nL "$chain" | \
|
$iptables "$IPTARGS" -t "$table" -I "$chain" $($iptables "$IPTARGS" -t "$table" --line-numbers -nL "$chain" | \
|
||||||
sed -ne '$s/[^0-9].*//p') -j "$target"
|
sed -ne '$s/[^0-9].*//p') -j "$target"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue