From 999a07f0d424e0a4189a1412a585206d4d937cc5 Mon Sep 17 00:00:00 2001 From: Reuben Dowle Date: Fri, 12 Feb 2021 10:04:16 +1300 Subject: [PATCH] nhrpd: Send prefix length in NAT extension the same as is done by Cisco Signed-off-by: Reuben Dowle --- nhrpd/nhrp_shortcut.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nhrpd/nhrp_shortcut.c b/nhrpd/nhrp_shortcut.c index 56a6699445..b12e45eaf0 100644 --- a/nhrpd/nhrp_shortcut.c +++ b/nhrpd/nhrp_shortcut.c @@ -424,8 +424,9 @@ static void nhrp_shortcut_send_resolution_req(struct nhrp_shortcut *s) ext = nhrp_ext_push(zb, hdr, NHRP_EXTENSION_NAT_ADDRESS); if (sockunion_family(&nifp->nat_nbma) != AF_UNSPEC) { - nhrp_cie_push(zb, NHRP_CODE_SUCCESS, - &nifp->nat_nbma, &nifp->afi[family2afi(sockunion_family(&s->addr))].addr); + cie = nhrp_cie_push(zb, NHRP_CODE_SUCCESS, + &nifp->nat_nbma, &if_ad->addr); + cie->prefix_length = 8 * sockunion_get_addrlen(&if_ad->addr); nhrp_ext_complete(zb, ext); } -- 2.39.5