]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: ioam: Distinguish input and output for hop-limit
authorJustin Iurman <justin.iurman@uliege.be>
Sun, 3 Oct 2021 18:45:36 +0000 (20:45 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Oct 2021 11:53:35 +0000 (12:53 +0100)
commit268a0ec91d6968c98d6aa7bf111c3ced2a6b2a33
tree56b454364afa8c04e153d0b49073d6cc64575697
parent70b2c5281aee77f77b6faf99cb20eb944797b90d
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>
include/net/ioam6.h
net/ipv6/exthdrs.c
net/ipv6/ioam6.c