summaryrefslogtreecommitdiffstats
path: root/nhrpd
diff options
context:
space:
mode:
authorAmol Lad <amol.lad@4rf.com>2021-02-25 07:34:11 +0100
committerReuben Dowle <reuben.dowle@4rf.com>2021-03-18 04:35:41 +0100
commite8089de12305880942a4fabcf726dcd8ddda5647 (patch)
tree635f012cf9cdfc724472642ff8c0b5db1f985a1d /nhrpd
parentnhrpd: Ensure invalid NAT extension info cannot be used (diff)
downloadfrr-e8089de12305880942a4fabcf726dcd8ddda5647.tar.xz
frr-e8089de12305880942a4fabcf726dcd8ddda5647.zip
nhrpd: Set prefix length in NAT extension in resolution-reply
Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
Diffstat (limited to 'nhrpd')
-rw-r--r--nhrpd/nhrp_peer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/nhrpd/nhrp_peer.c b/nhrpd/nhrp_peer.c
index 74e502b21..a4c93bd2a 100644
--- a/nhrpd/nhrp_peer.c
+++ b/nhrpd/nhrp_peer.c
@@ -622,6 +622,10 @@ static void nhrp_handle_resolution_req(struct nhrp_packet_parser *pp)
&pp->if_ad->addr);
if (!cie)
goto err;
+ cie->prefix_length =
+ 8 * sockunion_get_addrlen(
+ &pp->if_ad->addr);
+
cie->mtu = htons(pp->if_ad->mtu);
nhrp_ext_complete(zb, ext);
}