summaryrefslogtreecommitdiffstats
path: root/nhrpd
diff options
context:
space:
mode:
authorGaurav Goyal <gaurav.goyal@4rf.com>2020-11-19 22:31:01 +0100
committerReuben Dowle <reuben.dowle@4rf.com>2020-12-16 22:17:13 +0100
commit659fde26e0b3b6ebb153c644e51d61f505c61602 (patch)
tree90af2ab9212a11f3922e77319758442900e5d505 /nhrpd
parentnhrpd: Create route to private spoke-spoke network correctly (diff)
downloadfrr-659fde26e0b3b6ebb153c644e51d61f505c61602.tar.xz
frr-659fde26e0b3b6ebb153c644e51d61f505c61602.zip
nhrpd: Use MTU received in registration in nhs cache
Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
Diffstat (limited to 'nhrpd')
-rwxr-xr-xnhrpd/nhrp_nhs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/nhrpd/nhrp_nhs.c b/nhrpd/nhrp_nhs.c
index 3b604593c..286b0f982 100755
--- a/nhrpd/nhrp_nhs.c
+++ b/nhrpd/nhrp_nhs.c
@@ -35,6 +35,7 @@ static void nhrp_reg_reply(struct nhrp_reqid *reqid, void *arg)
union sockunion cie_nbma, cie_proto, *proto;
char buf[64];
int ok = 0, holdtime;
+ unsigned short mtu = 0;
nhrp_reqid_free(&nhrp_packet_reqid, &r->reqid);
@@ -57,6 +58,8 @@ static void nhrp_reg_reply(struct nhrp_reqid *reqid, void *arg)
|| (cie->code == NHRP_CODE_ADMINISTRATIVELY_PROHIBITED
&& nhs->hub)))
ok = 0;
+ mtu = ntohs(cie->mtu);
+ debugf(NHRP_DEBUG_COMMON, "NHS: CIE MTU: %d", mtu);
}
if (!ok)
@@ -96,7 +99,7 @@ static void nhrp_reg_reply(struct nhrp_reqid *reqid, void *arg)
c = nhrp_cache_get(ifp, &p->dst_proto, 1);
if (c)
nhrp_cache_update_binding(c, NHRP_CACHE_NHS, holdtime,
- nhrp_peer_ref(r->peer), 0, NULL);
+ nhrp_peer_ref(r->peer), mtu, NULL);
}
static int nhrp_reg_timeout(struct thread *t)