Re: [PATCH v6 bpf-next 1/2] bpf: Fix the null pointer dereference issue in bpf_lwt_xmit_push_encap

From: Feng Yang

Date: Wed Feb 25 2026 - 08:20:11 EST


On Mon, 23 Feb 2026 13:39:51 -0800, Martin KaFai Lau wrote:

...
> Please check if the v5 discussion make sense (fix in test_run.c). It
> should be something simpler than v5, e.g. always assign a dst to skb for
> is_lwt case. I think always using net->ipv6.ip6_null_entry should work
> but it needs to check ipv6 mod is loaded/enabled before using. Checking
> 'ipv6_bpf_stub' should do. I don't think we need to complicate things
> for v4 only kernel in test_run. I don't think testing skb->protocol
> matters also from looking at bpf_lwt_push_ip_encap but please check.


Sure, I'll check, modify, and test it. Thanks.