Commit a589ff44 authored by Natanael Copa's avatar Natanael Copa

main/shorewall-shell: add option to disable saving/restoring default route

When starting, shorewall will save all default routes. When stop, it
will try to restore it. But does it badly. On multiisp setups with pingu
it will break things.

We (ab)use the RESTORE_DEFAULT_ROUTE to make it possible to avoid
restoring the default route.
(cherry picked from commit 2c42b212)

fixes #1236
parent ff6557de
......@@ -2,7 +2,7 @@
pkgname=shorewall-shell
_v=4.2.11
pkgver=4.2.11
pkgrel=4
pkgrel=5
pkgdesc="Shoreline Firewall shell-based compiler."
url="http://www.shorewall.net/"
arch="noarch"
......@@ -14,6 +14,7 @@ source="http://www.shorewall.net/pub/shorewall/${_v%.*}/shorewall-$_v/$pkgname-$
shorewall-shell-ipset.patch
shorewall-shell-providers-gateway-none.patch
shorewall-shell-rp_filter.patch
restore-default-route.patch
"
_builddir="$srcdir"/$pkgname-$pkgver
......@@ -35,4 +36,5 @@ md5sums="518a7f389a6f606c109acb7dfbe18372 shorewall-shell-4.2.11.tar.bz2
64c01bc4f57203fb877bb334994eac38 shorewall-policyrouting.patch
79745ea284a08cb167b9a356ee0bff3b shorewall-shell-ipset.patch
0c6106a8cbb95d21c0c878a6235a65ac shorewall-shell-providers-gateway-none.patch
d5eadb6be45aa41f80669452baa853a6 shorewall-shell-rp_filter.patch"
d5eadb6be45aa41f80669452baa853a6 shorewall-shell-rp_filter.patch
c971270086d5de15327f498d1be64fcb restore-default-route.patch"
--- ./lib.providers.orig
+++ ./lib.providers
@@ -378,7 +378,9 @@
#
# Capture the default route(s) if we don't have it (them) already.
#
-[ -f \${VARDIR}/default_route ] || ip route list | grep -E '^\s*(default |nexthop )' > \${VARDIR}/default_route
+if [ "\$RESTORE_DEFAULT_ROUTE" != "No" ] && ! [ -f \${VARDIR}/default_route ]; then
+ ip route list | grep -E '^\s*(default |nexthop )' > \${VARDIR}/default_route
+fi
#
# Initialize the file that holds 'undo' commands
#
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment