summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGabriel Oginski <gabrielx.oginski@intel.com>2023-04-17 07:00:24 +0000
committerDave Wallace <dwallacelf@gmail.com>2023-04-25 15:50:05 +0000
commit980f3fb2d3a3f62b296341cb423df6e1d93a193d (patch)
tree65396747eef4aca914b96e04438bc90012817108
parentc7d50475ecf53e8c65d875710c8a97be7dd11bd9 (diff)
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
-rw-r--r--extras/strongswan/vpp_sswan/kernel_vpp_ipsec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/extras/strongswan/vpp_sswan/kernel_vpp_ipsec.c b/extras/strongswan/vpp_sswan/kernel_vpp_ipsec.c
index 652de6552f7..38d39512b31 100644
--- a/extras/strongswan/vpp_sswan/kernel_vpp_ipsec.c
+++ b/extras/strongswan/vpp_sswan/kernel_vpp_ipsec.c
@@ -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);