linux/drivers
Daniel Borkmann 3998d18426 netkit: Fix pkt_type override upon netkit pass verdict
When running Cilium connectivity test suite with netkit in L2 mode, we
found that compared to tcx a few tests were failing which pushed traffic
into an L7 proxy sitting in host namespace. The problem in particular is
around the invocation of eth_type_trans() in netkit.

In case of tcx, this is run before the tcx ingress is triggered inside
host namespace and thus if the BPF program uses the bpf_skb_change_type()
helper the newly set type is retained. However, in case of netkit, the
late eth_type_trans() invocation overrides the earlier decision from the
BPF program which eventually leads to the test failure.

Instead of eth_type_trans(), split out the relevant parts, meaning, reset
of mac header and call to eth_skb_pkt_type() before the BPF program is run
in order to have the same behavior as with tcx, and refactor a small helper
called eth_skb_pull_mac() which is run in case it's passed up the stack
where the mac header must be pulled. With this all connectivity tests pass.

Fixes: 35dfaad718 ("netkit, bpf: Add bpf programmable net device")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Nikolay Aleksandrov <razor@blackwall.org>
Link: https://lore.kernel.org/r/20240524163619.26001-2-daniel@iogearbox.net
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2024-05-25 10:48:57 -07:00
..
accel drm/print: drop include debugfs.h and include where needed 2024-04-25 17:05:48 +03:00
accessibility speakup: Avoid crash on very long word 2024-04-11 14:32:53 +02:00
acpi platform-drivers-x86 for v6.10-1 2024-05-16 09:14:50 -07:00
amba ARM: 9361/1: amba: store owner from modules with amba_driver_register() 2024-04-18 12:09:14 +01:00
android binder: check offset alignment in binder_get_object() 2024-04-11 15:19:12 +02:00
ata SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
atm atm/fore200e: Delete unused 'fore200e_boards' 2024-05-06 18:26:47 -07:00
auxdisplay auxdisplay: charlcd: Don't rebuild when CONFIG_PANEL_BOOT_MESSAGE=y 2024-04-11 13:34:29 +03:00
base powerpc updates for 6.10 2024-05-17 09:05:46 -07:00
bcma
block for-6.10/block-20240511 2024-05-13 13:03:54 -07:00
bluetooth MMC core: 2024-05-16 08:56:49 -07:00
bus Networking changes for 6.10. 2024-05-14 19:42:24 -07:00
cache cache: sifive_ccache: Silence unused variable warning 2024-04-11 07:28:37 +01:00
cdrom
cdx
char ARM development updates for v6.10-rc1 2024-05-17 08:53:47 -07:00
clk ARM development updates for v6.10-rc1 2024-05-17 08:53:47 -07:00
clocksource clocksource/drivers/arm_arch_timer: Mark hisi_161010101_oem_info const 2024-05-10 10:43:21 +02:00
comedi comedi: vmk80xx: fix incomplete endpoint checking 2024-04-11 15:16:23 +02:00
connector
counter
cpufreq powerpc updates for 6.10 2024-05-17 09:05:46 -07:00
cpuidle pmdomain core: 2024-05-16 08:50:32 -07:00
crypto Networking changes for 6.10. 2024-05-14 19:42:24 -07:00
cxl CXL changes for v6.10 merge window 2024-05-15 14:32:27 -07:00
dax Updates for nvdimm for 6.10 2024-05-15 14:28:56 -07:00
dca
devfreq PM / devfreq: exynos: Use DEFINE_SIMPLE_DEV_PM_OPS for PM functions 2024-05-09 00:30:37 +09:00
dio
dma ARM development updates for v6.10-rc1 2024-05-17 08:53:47 -07:00
dma-buf dma-buf: Do not build debugfs related code when !CONFIG_DEBUG_FS 2024-04-15 13:56:32 -03:00
dpll dpll: fix return value check for kmemdup 2024-05-13 16:53:53 -07:00
edac - Have skx_edac decode error addresses belonging to SGX properly 2024-05-14 08:31:10 -07:00
eisa alpha: remove DECpc AXP150 (Jensen) support 2024-05-03 22:09:50 +02:00
extcon
firewire firewire updates for v6.10 2024-05-14 18:57:22 -07:00
firmware sound updates for 6.10-rc1 2024-05-15 10:02:36 -07:00
fpga fpga: dfl-pci: add PCI subdevice ID for Intel D5005 card 2024-04-26 12:14:28 +08:00
fsi
gnss
gpio gpio updates for v6.10-rc1 2024-05-14 15:07:07 -07:00
gpu drm urgent for 6.10-rc1 merge: 2024-05-16 08:44:19 -07:00
greybus Char/Misc and other driver subsystem updates for 6.9-rc1 2024-03-21 13:21:31 -07:00
hid Merge branch 'for-6.10/winwing' into for-linus 2024-05-14 13:58:46 +02:00
hsi
hte hte: tegra-194: Convert to platform remove callback returning void 2024-04-12 11:02:58 -07:00
hv hyperv-fixes for v6.9-rc4 2024-04-11 16:23:56 -07:00
hwmon pwm: Changes for v6.10-rc1 2024-05-14 15:03:19 -07:00
hwspinlock
hwtracing ARM: 9379/1: coresight: tpda: drop owner assignment 2024-04-18 12:09:28 +01:00
i2c ARM development updates for v6.10-rc1 2024-05-17 08:53:47 -07:00
i3c
idle
iio regulator: Updates for v6.10 2024-05-14 14:36:09 -07:00
infiniband Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-05-09 10:01:01 -07:00
input ARM development updates for v6.10-rc1 2024-05-17 08:53:47 -07:00
interconnect interconnect fixes for v6.9-rc 2024-04-11 14:44:49 +02:00
iommu X86 interrupt handling update: 2024-05-14 10:01:29 -07:00
ipack
irqchip Updates for the interrupt subsystem: 2024-05-14 09:47:14 -07:00
isdn Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-04-11 14:23:47 -07:00
leds
macintosh powerpc updates for 6.10 2024-05-17 09:05:46 -07:00
mailbox
mcb
md Networking changes for 6.10. 2024-05-14 19:42:24 -07:00
media media updates for v6.10-rc1 2024-05-16 08:45:44 -07:00
memory ARM development updates for v6.10-rc1 2024-05-17 08:53:47 -07:00
memstick memstick: rtsx_usb_ms: Convert to platform remove callback returning void 2024-04-25 11:58:52 +02:00
message SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
mfd mfd: axp20x: Add support for AXP717 PMIC 2024-03-28 09:50:59 +00:00
misc hardening updates for 6.10-rc1 2024-05-13 14:14:05 -07:00
mmc MMC core: 2024-05-16 08:56:49 -07:00
most
mtd * MTD 2024-05-16 09:04:52 -07:00
mux
net netkit: Fix pkt_type override upon netkit pass verdict 2024-05-25 10:48:57 -07:00
nfc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-04-25 12:41:37 -07:00
ntb
nubus
nvdimm nvdimm/btt: always set max_integrity_segments 2024-04-25 12:37:12 -07:00
nvme for-6.10/block-20240511 2024-05-13 13:03:54 -07:00
nvmem
of Devicetree for v6.10: 2024-05-17 17:27:49 -07:00
opp OPP: OF: Export dev_opp_pm_calc_power() for usage from EM 2024-04-08 16:05:14 +02:00
parisc
parport
pci pci-v6.9-fixes-2 2024-05-08 09:37:58 -07:00
pcmcia
peci
perf ARM: 2024-05-15 14:46:43 -07:00
phy Merge tag 'drm-msm-next-2024-05-07' of https://gitlab.freedesktop.org/drm/msm into drm-next 2024-05-10 10:22:59 +10:00
pinctrl gpio updates for v6.10-rc1 2024-05-14 15:07:07 -07:00
platform platform-drivers-x86 for v6.10-1 2024-05-16 09:14:50 -07:00
pmdomain pmdomain: Merge branch fixes into next 2024-05-03 15:48:21 +02:00
pnp PNP: add HAS_IOPORT dependencies 2024-04-22 18:30:39 +02:00
power power: supply: mt6360_charger: Fix of_match for usb-otg-vbus regulator 2024-04-15 13:31:37 +02:00
powercap powercap: intel_rapl_tpmi: Enable PMU support 2024-04-30 21:10:37 +02:00
pps
ps3
ptp Networking changes for 6.10. 2024-05-14 19:42:24 -07:00
pwm pwm: pca9685: Drop explicit initialization of struct i2c_device_id::driver_data to 0 2024-05-10 07:30:27 +02:00
rapidio
ras RAS: Avoid build errors when CONFIG_DEBUG_FS=n 2024-03-26 21:48:21 +01:00
regulator regulator: Updates for v6.10 2024-05-14 14:36:09 -07:00
remoteproc remoteproc updates for v6.9 2024-03-21 10:37:39 -07:00
reset reset: k210: Deprecate SOC_CANAAN and use SOC_CANAAN_K210 2024-04-05 16:42:51 +01:00
rpmsg
rtc RTC for 6.9 2024-03-21 17:16:46 -07:00
s390 Networking changes for 6.10. 2024-05-14 19:42:24 -07:00
sbus
scsi SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
sh
siox SIOX changes for 6.9-rc1 2024-03-21 15:18:18 -07:00
slimbus slimbus: qcom-ngd-ctrl: Add timeout for wait operation 2024-05-03 07:30:32 +02:00
soc spi: Updates for v6.10 2024-05-14 14:41:01 -07:00
soundwire soundwire: amd: fix for wake interrupt handling for clockstop mode 2024-03-28 23:40:33 +05:30
spi spi: Updates for v6.10 2024-05-14 14:41:01 -07:00
spmi
ssb
staging media updates for v6.10-rc1 2024-05-16 08:45:44 -07:00
target SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
tc
tee TEE driver for Trusted Services 2024-04-29 22:29:44 +02:00
thermal ACPI updates for 6.10-rc1 2024-05-14 13:31:24 -07:00
thunderbolt thunderbolt: Avoid notify PM core about runtime PM resume 2024-04-10 10:49:58 +03:00
tty printk changes for 6.10 2024-05-15 12:34:46 -07:00
ufs SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
uio hyperv-fixes for v6.9-rc4 2024-04-11 16:23:56 -07:00
usb SCSI misc on 20240514 2024-05-14 18:25:53 -07:00
vdpa vDPA: code clean for vhost_vdpa uapi 2024-04-22 17:07:13 -04:00
vfio ARM development updates for v6.10-rc1 2024-05-17 08:53:47 -07:00
vhost net: extend ubuf_info callback to ops structure 2024-04-22 16:21:35 -07:00
video fbdev fixes and cleanups for 6.10-rc1: 2024-05-15 09:53:06 -07:00
virt ACPI updates for 6.10-rc1 2024-05-14 13:31:24 -07:00
virtio virtio_ring: enable premapped mode whatever use_dma_api 2024-05-13 17:07:41 -07:00
w1
watchdog
xen xen: branch for v6.9-rc1 2024-03-19 08:48:09 -07:00
zorro zorro: Use helpers from ioport.h 2024-04-29 16:45:53 +02:00
Kconfig
Makefile