diff options
author | Neale Ranns <nranns@cisco.com> | 2020-01-02 04:06:10 +0000 |
---|---|---|
committer | Ole Tr�an <otroan@employees.org> | 2020-11-02 08:49:08 +0000 |
commit | 041add7d12217494934b651e4e38b5eab5216ddc (patch) | |
tree | 42f6ed8c3e4477b7c7cf93b19f227e4fc0afb4cb /src/vnet/ip/ip.c | |
parent | 62877029aac3e05a1e1db579aeaad42bca5a70a4 (diff) |
ipsec: Tunnel SA DSCP behaviour
Type: feature
- use tunnel_encap_decap_flags to control the copying of DSCP/ECN/etc
during IPSEC tunnel mode encap.
- use DSCP value to have fixed encap value.
Signed-off-by: Neale Ranns <nranns@cisco.com>
Change-Id: If4f51fd4c1dcbb0422aac9bd078e5c14af5bf11f
Diffstat (limited to 'src/vnet/ip/ip.c')
-rw-r--r-- | src/vnet/ip/ip.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/vnet/ip/ip.c b/src/vnet/ip/ip.c index bceb529ee6f..062f5e7a4ef 100644 --- a/src/vnet/ip/ip.c +++ b/src/vnet/ip/ip.c @@ -155,6 +155,24 @@ format_ip_dscp (u8 * s, va_list * va) return (format (s, "unknown")); } +uword +unformat_ip_dscp (unformat_input_t * input, va_list * args) +{ + ip_dscp_t *dscp = va_arg (*args, ip_dscp_t *); + + if (0) + ; +#define _(n,v) \ + else if (unformat (input, #v)) \ + *dscp = IP_DSCP_##v; + foreach_ip_dscp +#undef _ + else + return 0; + + return 1; +} + u8 * format_ip_ecn (u8 * s, va_list * va) { |