From d7eef6c7aebb850c903ccea7d82522d26be4fb02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Fri, 24 Jul 2015 16:09:30 +0300 Subject: main/opennhrp: cherry-pick upstream fixes (cherry picked from commit 0df48acd155da7f5a1a6ed28ffa0c3d3624084a5) --- ...blish-shortcut-entry-if-cie-code-indicate.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 main/opennhrp/0005-do-not-establish-shortcut-entry-if-cie-code-indicate.patch (limited to 'main/opennhrp/0005-do-not-establish-shortcut-entry-if-cie-code-indicate.patch') 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?= +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 + -- cgit v1.2.3