Re: [PATCH net 1/2] seg6: separate dst_cache for input and output paths in seg6 lwtunnel
From: Nicolas Dichtel
Date: Tue Mar 31 2026 - 12:05:48 EST
Le 31/03/2026 à 13:07, Andrea Mayer a écrit :
> The seg6 lwtunnel uses a single dst_cache per encap route, shared
> between seg6_input_core() and seg6_output_core(). These two paths
> can perform the post-encap SID lookup in different routing contexts
> (e.g., ip rules matching on the ingress interface, or VRF table
> separation). Whichever path runs first populates the cache, and the
> other reuses it blindly, bypassing its own lookup.
>
> Fix this by splitting the cache into cache_input and cache_output,
> so each path maintains its own cached dst independently.
>
> Fixes: 6c8702c60b88 ("ipv6: sr: add support for SRH encapsulation and injection with lwtunnels")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Andrea Mayer <andrea.mayer@xxxxxxxxxxx>
Reviewed-by: Nicolas Dichtel <nicolas.dichtel@xxxxxxxxx>
Thanks,
Nicolas