mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-14 10:37:29 +00:00
nhrpd: copy NAT extension if present else attempt to populate
Signed-off-by: Reuben Dowle <reuben.dowle@4rf.com>
This commit is contained in:
parent
9c292647a9
commit
1bd508da17
@ -966,6 +966,10 @@ static void nhrp_peer_forward(struct nhrp_peer *p,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case NHRP_EXTENSION_NAT_ADDRESS:
|
case NHRP_EXTENSION_NAT_ADDRESS:
|
||||||
|
/* if NAT extension is not empty then copy it across else attempt to populate it */
|
||||||
|
if (len > 0) {
|
||||||
|
zbuf_copy(zb, &extpl, len);
|
||||||
|
} else {
|
||||||
if(packet_types[hdr->type].type == PACKET_REQUEST) {
|
if(packet_types[hdr->type].type == PACKET_REQUEST) {
|
||||||
debugf(NHRP_DEBUG_COMMON,"Processing NHRP_EXTENSION_NAT_ADDRESS while forwarding the request packet");
|
debugf(NHRP_DEBUG_COMMON,"Processing NHRP_EXTENSION_NAT_ADDRESS while forwarding the request packet");
|
||||||
proto = &pp->src_proto;
|
proto = &pp->src_proto;
|
||||||
@ -993,6 +997,7 @@ static void nhrp_peer_forward(struct nhrp_peer *p,
|
|||||||
} else {
|
} else {
|
||||||
zbuf_put(zb, extpl.head, len);
|
zbuf_put(zb, extpl.head, len);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (htons(ext->type) & NHRP_EXTENSION_FLAG_COMPULSORY)
|
if (htons(ext->type) & NHRP_EXTENSION_FLAG_COMPULSORY)
|
||||||
|
Loading…
Reference in New Issue
Block a user