Skip to content

bpf: Fix bpf_redirect to an ipip/ip6tnl dev

Martin KaFai Lau netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2bpf: Fix bpf_redirect to an ipip/ip6tnl devinclude/linux/netdevice.h net/core/dev.c net/core/filter.c+81 -194 replies
2/2bpf: Add test for bpf_redirect to ipip/ip6tnlsamples/bpf/Makefile samples/bpf/tc_l2_redirect.sh samples/bpf/tc_l2_redirect_kern.c +1 more+486 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchDaniel BorkmannAlexei Starovoitov
1/2A-b A-b
2/2A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net 0/2] bpf: Fix bpf_redirect to an ipip/ip6tnl dev

Hi,

This patch set fixes a bug in bpf_redirect(dev, flags) when dev is an ipip/ip6tnl. The current problem is IP-EthHdr-IP is sent out instead of IP-IP.

Patch 1 adds a dev->type test similar to dev_is_mac_header_xmit() in act_mirred.c which is only available in net-next. We can consider to refactor it once this patch is pulled into net-next from net.

Thanks,
-- Martin