Re: [PATCH] seg6: using DSCP of inner IPv4 packets

From: David Miller
Date: Wed Aug 05 2020 - 20:41:25 EST


From: Ahmed Abdelsalam <ahabdels@xxxxxxxxx>
Date: Tue, 4 Aug 2020 07:40:30 +0000

> This patch allows copying the DSCP from inner IPv4 header to the
> outer IPv6 header, when doing SRv6 Encapsulation.
>
> This allows forwarding packet across the SRv6 fabric based on their
> original traffic class.
>
> Signed-off-by: Ahmed Abdelsalam <ahabdels@xxxxxxxxx>

You have changed the hop limit behavior here and that neither seems
intentional nor correct.

When encapsulating ipv6 inside of ipv6 the inner hop limit should be
inherited. You should only use the DST hop limit when encapsulating
ipv4.

And that's what the existing code did.