aboutsummaryrefslogtreecommitdiffstats
path: root/main/opennhrp/0001-peer-reset-interface-nat-cie-when-server-does-not-de.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-07-24 16:09:30 +0300
committerTimo Teräs <timo.teras@iki.fi>2015-07-24 16:09:30 +0300
commit0df48acd155da7f5a1a6ed28ffa0c3d3624084a5 (patch)
tree5b9f28fb5973a49b7e8b8faada465ccf96644548 /main/opennhrp/0001-peer-reset-interface-nat-cie-when-server-does-not-de.patch
parentdf1c822e76d712cb306e491fd652b5acb54acaa0 (diff)
downloadaports-0df48acd155da7f5a1a6ed28ffa0c3d3624084a5.tar.bz2
aports-0df48acd155da7f5a1a6ed28ffa0c3d3624084a5.tar.xz
main/opennhrp: cherry-pick upstream fixes
Diffstat (limited to 'main/opennhrp/0001-peer-reset-interface-nat-cie-when-server-does-not-de.patch')
-rw-r--r--main/opennhrp/0001-peer-reset-interface-nat-cie-when-server-does-not-de.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/main/opennhrp/0001-peer-reset-interface-nat-cie-when-server-does-not-de.patch b/main/opennhrp/0001-peer-reset-interface-nat-cie-when-server-does-not-de.patch
new file mode 100644
index 0000000000..1bc766a4df
--- /dev/null
+++ b/main/opennhrp/0001-peer-reset-interface-nat-cie-when-server-does-not-de.patch
@@ -0,0 +1,29 @@
+From 578db3f65caec301ceb402e5c7b51624ed1c4576 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Thu, 11 Jul 2013 14:14:15 +0300
+Subject: [PATCH] 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.
+---
+ nhrp/nhrp_peer.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+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. */
+--
+2.4.6
+