Skip to content

Commit

Permalink
nhrpd: Send prefix length in NAT extension the same as is done by Cisco
Browse files Browse the repository at this point in the history
Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
  • Loading branch information
reubendowle committed Mar 18, 2021
1 parent c2cffff commit 999a07f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions nhrpd/nhrp_shortcut.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 999a07f

Please sign in to comment.