diff options
author | Amol Lad <amol.lad@4rf.com> | 2021-03-24 04:38:20 +0100 |
---|---|---|
committer | Reuben Dowle <reuben.dowle@4rf.com> | 2021-05-18 04:27:05 +0200 |
commit | 32dbbf1a10f18c382c3a3f967af3de8151050312 (patch) | |
tree | 9aee1a89e654a04d170f20a36ead4ff3884d71b9 /nhrpd | |
parent | nhrpd: Fix corrupt address being shown for shortcuts with no cache entry (diff) | |
download | frr-32dbbf1a10f18c382c3a3f967af3de8151050312.tar.xz frr-32dbbf1a10f18c382c3a3f967af3de8151050312.zip |
nhrpd: Set prefix correctly in resolution request
RFC2332 requires prefix length be 0xFF only when uniqueness bit is set.
Without this change Cisco spokes will reject resolution request messages
Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
Diffstat (limited to 'nhrpd')
-rw-r--r-- | nhrpd/nhrp_shortcut.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nhrpd/nhrp_shortcut.c b/nhrpd/nhrp_shortcut.c index 56861551e..0905ceb72 100644 --- a/nhrpd/nhrp_shortcut.c +++ b/nhrpd/nhrp_shortcut.c @@ -427,8 +427,10 @@ static void nhrp_shortcut_send_resolution_req(struct nhrp_shortcut *s) * */ /* FIXME: push CIE for each local protocol address */ cie = nhrp_cie_push(zb, NHRP_CODE_SUCCESS, NULL, NULL); - cie->prefix_length = 0xff; if_ad = &nifp->afi[family2afi(sockunion_family(&s->addr))]; + cie->prefix_length = (if_ad->flags & NHRP_IFF_REG_NO_UNIQUE) + ? 8 * sockunion_get_addrlen(&s->addr) + : 0xff; cie->holding_time = htons(if_ad->holdtime); cie->mtu = htons(if_ad->mtu); debugf(NHRP_DEBUG_COMMON, |