aboutsummaryrefslogtreecommitdiffstats
path: root/main/opennhrp/0005-do-not-establish-shortcut-entry-if-cie-code-indicate.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 14:21:08 +0000
commitd7eef6c7aebb850c903ccea7d82522d26be4fb02 (patch)
treee440be1e7cea2b0238e032cc5d1594c511ef254d /main/opennhrp/0005-do-not-establish-shortcut-entry-if-cie-code-indicate.patch
parentf8d983a322b4d97dfde40bdba3056bae43a16c35 (diff)
downloadaports-d7eef6c7aebb850c903ccea7d82522d26be4fb02.tar.bz2
aports-d7eef6c7aebb850c903ccea7d82522d26be4fb02.tar.xz
main/opennhrp: cherry-pick upstream fixes
(cherry picked from commit 0df48acd155da7f5a1a6ed28ffa0c3d3624084a5)
Diffstat (limited to 'main/opennhrp/0005-do-not-establish-shortcut-entry-if-cie-code-indicate.patch')
-rw-r--r--main/opennhrp/0005-do-not-establish-shortcut-entry-if-cie-code-indicate.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/main/opennhrp/0005-do-not-establish-shortcut-entry-if-cie-code-indicate.patch b/main/opennhrp/0005-do-not-establish-shortcut-entry-if-cie-code-indicate.patch
new file mode 100644
index 0000000000..5ec9ee137a
--- /dev/null
+++ b/main/opennhrp/0005-do-not-establish-shortcut-entry-if-cie-code-indicate.patch
@@ -0,0 +1,37 @@
+From a33098aed9805f78ecd23c2936ecdbd588b60c62 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
+Date: Wed, 27 May 2015 17:59:35 +0300
+Subject: [PATCH] do not establish shortcut entry if cie code indicates failure
+
+---
+ nhrp/nhrp_peer.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/nhrp/nhrp_peer.c b/nhrp/nhrp_peer.c
+index 9f8f45f..8aa7a64 100644
+--- a/nhrp/nhrp_peer.c
++++ b/nhrp/nhrp_peer.c
+@@ -1210,14 +1210,18 @@ static void nhrp_peer_handle_resolution_reply(void *ctx,
+ if (cie == NULL)
+ goto ret;
+
+- nhrp_info("Received Resolution Reply %s/%d is at proto %s nbma %s",
++ nhrp_info("Received Resolution Reply %s/%d is at proto %s nbma %s (code %d)",
+ nhrp_address_format(&peer->protocol_address,
+ sizeof(dst), dst),
+ cie->hdr.prefix_length,
+ nhrp_address_format(&cie->protocol_address,
+ sizeof(tmp), tmp),
+ nhrp_address_format(&cie->nbma_address,
+- sizeof(nbma), nbma));
++ sizeof(nbma), nbma),
++ cie->hdr.code);
++
++ if (cie->hdr.code != NHRP_CODE_SUCCESS)
++ goto ret;
+
+ payload = nhrp_packet_extension(reply,
+ NHRP_EXTENSION_NAT_ADDRESS |
+--
+2.4.6
+