ipsec: CLI improvement for udp port encap
Change-Id: I59f55db7209549ad43a1205470a2f5ea9ea8a1c7
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: feature
diff --git a/src/vnet/ipsec/ipsec_cli.c b/src/vnet/ipsec/ipsec_cli.c
index 0b0ed6c..b708e50 100644
--- a/src/vnet/ipsec/ipsec_cli.c
+++ b/src/vnet/ipsec/ipsec_cli.c
@@ -97,6 +97,7 @@
ipsec_key_t ck = { 0 };
ipsec_key_t ik = { 0 };
u32 id, spi, salt, sai;
+ int i = 0;
u16 udp_src, udp_dst;
int is_add, rv;
u32 m_args = 0;
@@ -158,6 +159,10 @@
else if (unformat (line_input, "tunnel-dst %U",
unformat_ip46_address, &tun_dst, IP46_TYPE_ANY))
;
+ else if (unformat (line_input, "udp-src-port %d", &i))
+ udp_src = i;
+ else if (unformat (line_input, "udp-dst-port %d", &i))
+ udp_dst = i;
else if (unformat (line_input, "tx-table-id %d", &tx_table_id))
;
else if (unformat (line_input, "inbound"))