Re: [syzbot] [net?] WARNING in mpls_gso_segment

Eric Dumazet
2024-02-22T13:27:35Z

On Thu, Feb 22, 2024 at 1:57 PM Florian Westphal <fw@strlen.de> wrote:
>
> Eric Dumazet <edumazet@google.com> wrote:
> > I was thinking about adding a debug check in skb_inner_network_header(skb)
> > if inner_network_header is zero (that would mean it is not 'set' yet),
> > but this would trigger even after your patch.
>
> What about adding:
>
> static inline bool skb_inner_network_header_was_set(const struct sk_buff *skb)
> {
> return skb->inner_network_header > 0;
> }
>
> ... and using that instead of checking for negative header length
> post-subtraction?

SGTM