]> git.puffer.fish Git - matthieu/frr.git/commitdiff
nhrpd: Set prefix length in NAT extension in resolution-reply
authorAmol Lad <amol.lad@4rf.com>
Thu, 25 Feb 2021 06:34:11 +0000 (12:04 +0530)
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_peer.c

index 74e502b2144ff230d9302ddba1e45d37211e2ad4..a4c93bd2ae084a973482da3588ddd834953125f3 100644 (file)
@@ -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);
                        }