aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2010-11-01 13:39:58 +0200
committerTimo Teräs <timo.teras@iki.fi>2010-11-01 13:40:55 +0200
commit758dce80584f1a789215a28b46db774edb419e90 (patch)
treedc5edf048b57397287bc30b15b337213d6675b3d
parent4f23c607b82e9bdc1fc51cfc98f3511811cfb9d1 (diff)
downloadaports-758dce80584f1a789215a28b46db774edb419e90.tar.bz2
aports-758dce80584f1a789215a28b46db774edb419e90.tar.xz
main/shorewall-shell: add policy routing related patch
To allow creation of routing tables to be managed by an external component (e.g. quagga or opennhrp).
-rw-r--r--main/shorewall-shell/APKBUILD18
-rw-r--r--main/shorewall-shell/shorewall-policyrouting.patch47
2 files changed, 62 insertions, 3 deletions
diff --git a/main/shorewall-shell/APKBUILD b/main/shorewall-shell/APKBUILD
index 643562f209..b6dd29950e 100644
--- a/main/shorewall-shell/APKBUILD
+++ b/main/shorewall-shell/APKBUILD
@@ -2,16 +2,28 @@
pkgname=shorewall-shell
_v=4.2.10
pkgver=4.2.10
-pkgrel=0
+pkgrel=1
pkgdesc="Shoreline Firewall shell-based compiler."
url="http://www.shorewall.net/"
license="GPL-2"
depends="shorewall-common"
#subpackages="$pkgname-doc"
-source="http://www.shorewall.net/pub/shorewall/${_v%.*}/shorewall-$_v/$pkgname-$pkgver.tar.bz2"
+source="http://www.shorewall.net/pub/shorewall/${_v%.*}/shorewall-$_v/$pkgname-$pkgver.tar.bz2
+ shorewall-policyrouting.patch
+ "
+
+prepare() {
+ cd "$srcdir"/$pkgname-$pkgver
+ for i in ../*.patch; do
+ msg "Applying $i..."
+ patch -p1 -i $i || return 1
+ done
+}
build() {
cd "$srcdir"/$pkgname-$pkgver
PREFIX="$pkgdir" ./install.sh || return 1
}
-md5sums="d6f7cbc3c502c09921ede920547d5017 shorewall-shell-4.2.10.tar.bz2"
+
+md5sums="d6f7cbc3c502c09921ede920547d5017 shorewall-shell-4.2.10.tar.bz2
+64c01bc4f57203fb877bb334994eac38 shorewall-policyrouting.patch"
diff --git a/main/shorewall-shell/shorewall-policyrouting.patch b/main/shorewall-shell/shorewall-policyrouting.patch
new file mode 100644
index 0000000000..26399108e3
--- /dev/null
+++ b/main/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