diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-10-13 07:36:41 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-10-13 07:36:41 +0000 |
commit | 1e46ca977586cb2932102eaab67372e9126ae6a8 (patch) | |
tree | d6c89562cc02802bde4c739371d04ed7b8542682 /main/shorewall-shell/shorewall-shell-providers-gateway-none.patch | |
parent | 0dd4af812f5118c61b8c6cde4a3141c3a01202db (diff) | |
download | aports-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/shorewall-shell-providers-gateway-none.patch')
-rw-r--r-- | main/shorewall-shell/shorewall-shell-providers-gateway-none.patch | 27 |
1 files changed, 27 insertions, 0 deletions
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 0000000000..223d3d8a59 --- /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 |