diff options
author | Mohammed Hawari <mohammed@hawari.fr> | 2020-12-01 11:30:57 +0100 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2020-12-08 16:38:01 +0000 |
commit | 59b792ffb1d77309b0ab17e441fd14237adb74db (patch) | |
tree | f6ea354d07103861147b8e70015eb3d7fc9e50f5 /src/vnet/ipip | |
parent | d2fb601022e25055211f6e6ccb960758b8490073 (diff) |
tunnel: add cli support for encap_decap flags
Change-Id: I2bf6ba325975309183dba1e14e9519c944710752
Signed-off-by: Mohammed Hawari <mohammed@hawari.fr>
Type: improvement
Diffstat (limited to 'src/vnet/ipip')
-rw-r--r-- | src/vnet/ipip/ipip_cli.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vnet/ipip/ipip_cli.c b/src/vnet/ipip/ipip_cli.c index 5e049af3426..872fb33117f 100644 --- a/src/vnet/ipip/ipip_cli.c +++ b/src/vnet/ipip/ipip_cli.c @@ -35,6 +35,7 @@ create_ipip_tunnel_command_fn (vlib_main_t * vm, clib_error_t *error = NULL; bool ip4_set = false, ip6_set = false; tunnel_mode_t mode = TUNNEL_MODE_P2P; + tunnel_encap_decap_flags_t flags = TUNNEL_ENCAP_DECAP_FLAG_NONE; /* Get a line of input. */ if (!unformat_user (input, unformat_line_input, line_input)) @@ -75,6 +76,11 @@ create_ipip_tunnel_command_fn (vlib_main_t * vm, else if (unformat (line_input, "outer-table-id %d", &table_id)) ; else + if (unformat + (line_input, "flags %U", unformat_tunnel_encap_decap_flags, + &flags)) + ; + else { error = clib_error_return (0, "unknown input `%U'", format_unformat_error, @@ -109,8 +115,7 @@ create_ipip_tunnel_command_fn (vlib_main_t * vm, &src, &dst, fib_index, - TUNNEL_ENCAP_DECAP_FLAG_NONE, - IP_DSCP_CS0, mode, &sw_if_index); + flags, IP_DSCP_CS0, mode, &sw_if_index); } switch (rv) |