]> git.puffer.fish Git - mirror/frr.git/commitdiff
nhrpd: Send prefix length in NAT extension the same as is done by Cisco
authorReuben Dowle <reuben.dowle@4rf.com>
Thu, 11 Feb 2021 21:04:16 +0000 (10:04 +1300)
committerReuben Dowle <reuben.dowle@4rf.com>
Thu, 18 Mar 2021 03:35:41 +0000 (16:35 +1300)
Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
nhrpd/nhrp_shortcut.c

index 56a669944532cbd66e7fbe2e23b9b166f81a91d1..b12e45eaf0942ee630b23a1ffbd1a89fdd472106 100644 (file)
@@ -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);
        }