aboutsummaryrefslogtreecommitdiffstats
path: root/testing/shorewall-shell/shorewall-policyrouting.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-11-01 09:49:18 +0200
committerTimo Teräs <timo.teras@iki.fi>2010-11-01 09:49:18 +0200
commit3634d34df9bc0c2e78943e399628f1356ed4d004 (patch)
tree08391aa5484b40871050db38e92ad7db03ea3ef5 /testing/shorewall-shell/shorewall-policyrouting.patch
parenta0a65d6138c63e33f7950a069301894c2a4cec5f (diff)
downloadaports-3634d34df9bc0c2e78943e399628f1356ed4d004.tar.bz2
aports-3634d34df9bc0c2e78943e399628f1356ed4d004.tar.xz
testing/shorewall: add policy routing related patch
To allow creation of routing tables to be managed by an external component (e.g. quagga or opennhrp).
Diffstat (limited to 'testing/shorewall-shell/shorewall-policyrouting.patch')
-rw-r--r--testing/shorewall-shell/shorewall-policyrouting.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/testing/shorewall-shell/shorewall-policyrouting.patch b/testing/shorewall-shell/shorewall-policyrouting.patch
new file mode 100644
index 0000000000..22a332ab1c
--- /dev/null
+++ b/testing/shorewall-shell/shorewall-policyrouting.patch
@@ -0,0 +1,47 @@
+--- old/lib.providers
++++ new/lib.providers
+@@ -141,7 +141,7 @@
+ # Add Provider $table ($number)
+ #
+ __EOF__
+- save_command "if interface_is_usable $interface; then"
++ save_command "if [ -n \"$interface\" ] && interface_is_usable \"$interface\"; then"
+ save_indent1="$INDENT"
+ INDENT="$INDENT "
+
+@@ -283,7 +283,14 @@
+ INDENT="$save_indent1"
+ save_command else
+
+- if [ -n "$optional" ]; then
++ if [ "${interface:--}" == "-" -a "${duplicate:--}" == "-" -a "${gateway:--}" == "-" -a "${options:--}" == "-" -a "${copy:--}" == "-" ]; then
++ indent >&3 << __EOF__
++
++progress_message " Provider $table ($number) Added"
++
++__EOF__
++
++ elif [ -n "$optional" ]; then
+ save_command " error_message \"WARNING: Interface $interface is not configured -- Provider $table ($number) not Added\""
+ save_command " ${iface}_up="
+ else
+@@ -316,10 +323,6 @@
+ [ "x$source" = x- ] && source=
+ [ "x$dest" = x- ] && dest= || dest="to $dest"
+
+- [ -n "${source}${dest}" ] || fatal_error "You must specify either the source or destination in an rt rule: \"$rule\""
+-
+- [ -n "${dest:=to 0.0.0.0/0}" ]
+-
+ if [ -n "$source" ]; then
+ case $source in
+ *:*)
+@@ -332,8 +335,6 @@
+ source="iif $source"
+ ;;
+ esac
+- else
+- source='from 0.0.0.0/0'
+ fi
+
+ case "$priority" in