aboutsummaryrefslogtreecommitdiffstats
path: root/main/opennhrp/0006-modify-packet-destination-only-for-registration-requ.patch
blob: 4fb2a576d1deab2c46c61e26f438e694b83b7f19 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 409b4e18250ef32197191d37a9c5ade7abcf3594 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Wed, 27 May 2015 18:01:17 +0300
Subject: [PATCH] modify packet destination only for registration requests

---
 nhrp/nhrp_packet.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/nhrp/nhrp_packet.c b/nhrp/nhrp_packet.c
index 566a6cb..d428cd9 100644
--- a/nhrp/nhrp_packet.c
+++ b/nhrp/nhrp_packet.c
@@ -762,7 +762,8 @@ static int nhrp_packet_receive_local(struct nhrp_packet *packet)
 		return FALSE;
 	}
 
-	if (packet->dst_peer->next_hop_address.type != PF_UNSPEC) {
+	if (packet->dst_peer->next_hop_address.type != PF_UNSPEC &&
+	    packet->hdr.type == NHRP_PACKET_REGISTRATION_REQUEST) {
 		/* Broadcast destinations gets rewritten as if destinied to
 		 * our local address */
 		packet->dst_protocol_address =
-- 
2.4.6