bpf: Fix unused nskb warning in bpf_icmp_send

Declare nskb inside the IPv4 and IPv6 case blocks so it is only present
when the corresponding code is built. The case braces are intentional to
scope the local declarations under the switch labels.

Fixes: f3603df9ae ("bpf: Add bpf_icmp_send kfunc")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Mahe Tardy <mahe.tardy@gmail.com>
Link: https://lore.kernel.org/bpf/20260710180915.7105-1-mahe.tardy@gmail.com
Closes: https://lore.kernel.org/oe-kbuild-all/202607110140.JeJZ6GIa-lkp@intel.com/
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
This commit is contained in:
Mahe Tardy 2026-07-10 18:09:15 +00:00 • committed by Kumar Kartikeya Dwivedi
commit 30f77a0419
No known key found for this signature in database
GPG key ID: 472D377B63542F83