vpp-swan: assign src/dst port in udp encap

This patch add in missing src/dst port assignment in SA for udp port
if encap.

Type: fix
Signed-off-by: Gabriel Oginski <gabrielx.oginski@intel.com>
Change-Id: I84219c016c5a32590aba0371c01ad8d44cbf4c5c
This commit is contained in:
Gabriel Oginski
2023-04-17 07:00:24 +00:00
committed by Dave Wallace
parent c7d50475ec
commit 980f3fb2d3

View File

@ -1598,8 +1598,10 @@ METHOD (kernel_ipsec_t, add_sa, status_t, private_kernel_vpp_ipsec_t *this,
}
if (data->encap)
{
DBG1 (DBG_KNL, "UDP encap!!!!!!!!!!!!!!!!!!!!");
DBG1 (DBG_KNL, "UDP encap");
flags |= IPSEC_API_SAD_FLAG_UDP_ENCAP;
mp->entry.udp_src_port = htons (natt_port);
mp->entry.udp_dst_port = htons (natt_port);
}
mp->entry.flags = htonl (flags);