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

Florian Westphal
2024-02-22T12:57:43Z

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?