aboutsummaryrefslogtreecommitdiffstats
path: root/main/opennhrp
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2013-07-11 11:51:14 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2013-07-11 11:53:12 +0000
commit8d00aea74fced42fcd83ce32f4d10fb1fba4fc75 (patch)
treee65ec33e9451bf6fba1ca18c64d515436537050d /main/opennhrp
parent650c11aa0b00af727882f95b03c5efa794435d02 (diff)
downloadaports-8d00aea74fced42fcd83ce32f4d10fb1fba4fc75.tar.bz2
aports-8d00aea74fced42fcd83ce32f4d10fb1fba4fc75.tar.xz
main/opennhrp: reset NAT after broken routing
fixes a corner case that system had broken routing (typically due to dual ISP), it gets fixed without changing gre interface.
Diffstat (limited to 'main/opennhrp')
-rw-r--r--main/opennhrp/APKBUILD14
-rw-r--r--main/opennhrp/reset-nat.patch25
2 files changed, 38 insertions, 1 deletions
diff --git a/main/opennhrp/APKBUILD b/main/opennhrp/APKBUILD
index 4d099574cc..8a23ec29b3 100644
--- a/main/opennhrp/APKBUILD
+++ b/main/opennhrp/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=opennhrp
pkgver=0.14.1
-pkgrel=0
+pkgrel=1
pkgdesc="NBMA Next Hop Resolution Protocol daemon"
url="http://sourceforge.net/projects/opennhrp"
arch="all"
@@ -11,6 +11,7 @@ makedepends="c-ares-dev"
subpackages="$pkgname-doc"
source="http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2
opennhrp-0.9.3-peer-up-bgp.patch
+ reset-nat.patch
$pkgname.initd
$pkgname.confd
"
@@ -34,5 +35,16 @@ package() {
}
md5sums="eb42ddb13e07ceb415b9ebb8eaca28ee opennhrp-0.14.1.tar.bz2
f81539fc92800bb79668dda119a97d1d opennhrp-0.9.3-peer-up-bgp.patch
+2b31e177d56b18c942abb0e9d43e457d reset-nat.patch
ae65f88ccf849ef882669a8b4f0c7fc0 opennhrp.initd
8eee86233728dc0d156bbfee6d98f338 opennhrp.confd"
+sha256sums="1517d53d688ffc165a1da20c344d96b4c53e60f34bd73c64e60cb67cfca4e9ab opennhrp-0.14.1.tar.bz2
+d348cc75694761124a7e05406d9e21e59251be185356bd3d3bec8dcc9dbbac73 opennhrp-0.9.3-peer-up-bgp.patch
+2b362cd953023a1fd22f42071fc284c581f1c34128f98c9e409fe79f384e77f0 reset-nat.patch
+40a260ecda7b7caca03a914c7ef7819023f54b0b3bd97189bd88f8f7275d70d7 opennhrp.initd
+83a7ad5e94546dbdfaabf0dd12c0d2e611b89cab06c600499e9453777e28928f opennhrp.confd"
+sha512sums="dd0d5debf86d195256995406909c7406d4b60dcdd3a47fca95fd7053b1691e1863b430ff9d65e8633c2d49c747abb4fdc10b45bdef0d0bfa733e94e33c476785 opennhrp-0.14.1.tar.bz2
+6ce107a2ad59331ab130108b49e80de5902d96002480f0465f7ad15b5146637a67982d2edaa392117a3f1820381b6b4a8985bef2a49364ce269c0bbc632d1739 opennhrp-0.9.3-peer-up-bgp.patch
+53d45f89b2643c71734c2404c5f229ab8cf107ea9c2e2ed4f64ab03c825b2438670e606508c5d79afedd984171f0ea3546324917ad86bc7e1e2e36573a53d283 reset-nat.patch
+3ca19432d0873f2746d4abc324c3fa5f54d528d4fdaba5f059a183b3ae882f08acd31cb3f1cdbd197942632b0086dee198d1007a504572ab269f79c144ef716d opennhrp.initd
+c998a0ba198e187c72d09ed3ba2e12fbd30c5d998ed06da01394058741c28a534f1c7e9d692f931ff00dac76c7d4e19e911f7d2ad48deb94f0cef8bd706c4315 opennhrp.confd"
diff --git a/main/opennhrp/reset-nat.patch b/main/opennhrp/reset-nat.patch
new file mode 100644
index 0000000000..5c8ebccecb
--- /dev/null
+++ b/main/opennhrp/reset-nat.patch
@@ -0,0 +1,25 @@
+commit 578db3f65caec301ceb402e5c7b51624ed1c4576 (HEAD, origin/master, origin/HEAD, master)
+Author: Timo Teräs <timo.teras@iki.fi>
+Date: Thu Jul 11 14:14:15 2013 +0300
+
+ peer: reset interface nat cie when server does not detect nat
+
+ fixes a corner case that system had broken routing, it gets fixed
+ without changing gre interface. for normal operation the nat cie is
+ reset by gre interface change hooks.
+
+diff --git a/nhrp/nhrp_peer.c b/nhrp/nhrp_peer.c
+index 97bbe48..2dbdeea 100644
+--- a/nhrp/nhrp_peer.c
++++ b/nhrp/nhrp_peer.c
+@@ -1001,6 +1001,9 @@ static void nhrp_peer_handle_registration_reply(void *ctx,
+ peer->interface->nat_cie = *cie;
+ }
+ }
++ if (payload == NULL || cie == NULL)
++ memset(&peer->interface->nat_cie, 0,
++ sizeof(peer->interface->nat_cie));
+
+ /* If not re-registration, send a purge request for each subnet
+ * we accept shortcuts to, to clear server redirection cache. */
+