diff options
author | Justin Iurman <justin.iurman@uliege.be> | 2021-10-03 20:45:36 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-04 13:53:35 +0200 |
commit | 52d03786459a7cf4d63a68146409f7a2088aefb2 (patch) | |
tree | 56b454364afa8c04e153d0b49073d6cc64575697 /net/ipv6/exthdrs.c | |
parent | net/mlx4_en: avoid one cache line miss to ring doorbell (diff) | |
download | linux-52d03786459a7cf4d63a68146409f7a2088aefb2.tar.xz linux-52d03786459a7cf4d63a68146409f7a2088aefb2.zip |
ipv6: ioam: Distinguish input and output for hop-limit
This patch anticipates the support for the IOAM insertion inside in-transit
packets, by making a difference between input and output in order to determine
the right value for its hop-limit (inherited from the IPv6 hop-limit).
Input case: happens before ip6_forward, the IPv6 hop-limit is not decremented
yet -> decrement the IOAM hop-limit to reflect the new hop inside the trace.
Output case: happens after ip6_forward, the IPv6 hop-limit has already been
decremented -> keep the same value for the IOAM hop-limit.
Signed-off-by: Justin Iurman <justin.iurman@uliege.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/exthdrs.c')
-rw-r--r-- | net/ipv6/exthdrs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 3a871a09f962..38ece3b7b839 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c @@ -979,7 +979,7 @@ static bool ipv6_hop_ioam(struct sk_buff *skb, int optoff) if (!skb_valid_dst(skb)) ip6_route_input(skb); - ioam6_fill_trace_data(skb, ns, trace); + ioam6_fill_trace_data(skb, ns, trace, true); break; default: break; |