From a91cb45909642978592c7e21a8f6d2da2e44e506 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 4 Feb 2021 11:02:52 +0000 Subject: tunnel: support copying TTL and flow label from inner to outer Type: feature The added functionality is to support copying TTL and flow label from inner to outer. The .api was extened to support expressing this and also adding a common tunnel endpoint type. i find it best to make API changes in one patch so there are less versions of the API. Signed-off-by: Neale Ranns Change-Id: I755c1e3f4c475058792af39c1abeda92129efb76 --- src/vnet/ipip/ipip.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/vnet/ipip') diff --git a/src/vnet/ipip/ipip.c b/src/vnet/ipip/ipip.c index ca52142f5c6..d43bcd1cb53 100644 --- a/src/vnet/ipip/ipip.c +++ b/src/vnet/ipip/ipip.c @@ -184,7 +184,7 @@ ipip46_fixup (vlib_main_t * vm, const ip_adjacency_t * adj, vlib_buffer_t * b, ip6->payload_length = clib_host_to_net_u16 (vlib_buffer_length_in_chain (vm, b) - sizeof (*ip6)); - tunnel_encap_fixup_4o6 (flags, ((ip4_header_t *) (ip6 + 1)), ip6); + tunnel_encap_fixup_4o6 (flags, b, ((ip4_header_t *) (ip6 + 1)), ip6); } static void @@ -224,7 +224,8 @@ ipipm6_fixup (vlib_main_t *vm, const ip_adjacency_t *adj, vlib_buffer_t *b, ip6 = vlib_buffer_get_current (b); ip6->payload_length = clib_host_to_net_u16 (vlib_buffer_length_in_chain (vm, b) - sizeof (*ip6)); - tunnel_encap_fixup_mplso6 (flags, (mpls_unicast_header_t *) (ip6 + 1), ip6); + tunnel_encap_fixup_mplso6 (flags, b, (mpls_unicast_header_t *) (ip6 + 1), + ip6); } static void -- cgit 1.2.3-korg