summaryrefslogtreecommitdiffstats
path: root/main/shorewall-shell
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-10-13 07:36:41 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-10-13 07:36:41 +0000
commit1e46ca977586cb2932102eaab67372e9126ae6a8 (patch)
treed6c89562cc02802bde4c739371d04ed7b8542682 /main/shorewall-shell
parent0dd4af812f5118c61b8c6cde4a3141c3a01202db (diff)
downloadaports-1e46ca977586cb2932102eaab67372e9126ae6a8.tar.bz2
aports-1e46ca977586cb2932102eaab67372e9126ae6a8.tar.xz
main/shorewall-shell: add support for "none" gateway in providers
This will make shorewall not add or delete any routes to the providers route table
Diffstat (limited to 'main/shorewall-shell')
-rw-r--r--main/shorewall-shell/APKBUILD6
-rw-r--r--main/shorewall-shell/shorewall-shell-providers-gateway-none.patch27
2 files changed, 31 insertions, 2 deletions
diff --git a/main/shorewall-shell/APKBUILD b/main/shorewall-shell/APKBUILD
index 095982424..1dc8c7094 100644
--- a/main/shorewall-shell/APKBUILD
+++ b/main/shorewall-shell/APKBUILD
@@ -2,7 +2,7 @@
pkgname=shorewall-shell
_v=4.2.11
pkgver=4.2.11
-pkgrel=0
+pkgrel=1
pkgdesc="Shoreline Firewall shell-based compiler."
url="http://www.shorewall.net/"
arch="noarch"
@@ -12,6 +12,7 @@ depends="shorewall-common"
source="http://www.shorewall.net/pub/shorewall/${_v%.*}/shorewall-$_v/$pkgname-$pkgver.tar.bz2
shorewall-policyrouting.patch
shorewall-shell-ipset.patch
+ shorewall-shell-providers-gateway-none.patch
"
_builddir="$srcdir"/$pkgname-$pkgver
@@ -31,4 +32,5 @@ build() {
md5sums="518a7f389a6f606c109acb7dfbe18372 shorewall-shell-4.2.11.tar.bz2
64c01bc4f57203fb877bb334994eac38 shorewall-policyrouting.patch
-79745ea284a08cb167b9a356ee0bff3b shorewall-shell-ipset.patch"
+79745ea284a08cb167b9a356ee0bff3b shorewall-shell-ipset.patch
+48ef4d6120a012a6441d604a120fb039 shorewall-shell-providers-gateway-none.patch"
diff --git a/main/shorewall-shell/shorewall-shell-providers-gateway-none.patch b/main/shorewall-shell/shorewall-shell-providers-gateway-none.patch
new file mode 100644
index 000000000..223d3d8a5
--- /dev/null
+++ b/main/shorewall-shell/shorewall-shell-providers-gateway-none.patch
@@ -0,0 +1,27 @@
+--- /usr/share/shorewall-shell/lib.providers
++++ ./lib.providers
+@@ -149,11 +149,13 @@
+
+ save_command "${iface}_up=Yes"
+
+- save_command "qt ip route flush table $number"
++ if [ "x$gateway" != "xnone" ]; then
++ save_command "qt ip route flush table $number"
+
+- indent >&3 << __EOF__
++ indent >&3 << __EOF__
+ echo "qt ip route flush table $number" >> \${VARDIR}/undo_routing
+ __EOF__
++ fi
+
+ if [ "x${duplicate:=-}" != x- ]; then
+ if [ "x${copy:=-}" != "x-" ]; then
+@@ -183,6 +185,8 @@
+ fi
+
+ __EOF__
++ elif [ "x$gateway" = "xnone" ]; then
++ gateway=
+ elif [ "x$gateway" != "x-" -a -n "$gateway" ]; then
+ indent >&3 << __EOF__
+ run_ip route replace $gateway src \$(find_first_interface_address $interface) dev $interface table $number