linux/drivers/net
Andrea Mayer 0489390882 vrf: add mac header for tunneled packets when sniffer is attached
Before this patch, a sniffer attached to a VRF used as the receiving
interface of L3 tunneled packets detects them as malformed packets and
it complains about that (i.e.: tcpdump shows bogus packets).

The reason is that a tunneled L3 packet does not carry any L2
information and when the VRF is set as the receiving interface of a
decapsulated L3 packet, no mac header is currently set or valid.
Therefore, the purpose of this patch consists of adding a MAC header to
any packet which is directly received on the VRF interface ONLY IF:

 i) a sniffer is attached on the VRF and ii) the mac header is not set.

In this case, the mac address of the VRF is copied in both the
destination and the source address of the ethernet header. The protocol
type is set either to IPv4 or IPv6, depending on which L3 packet is
received.

Signed-off-by: Andrea Mayer <andrea.mayer@uniroma2.it>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2020-12-04 13:30:50 -08:00
..
appletalk
arcnet
bonding Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-11-27 18:25:27 -08:00
caif
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-12-03 15:44:09 -08:00
dsa net: dsa: microchip: ksz8795: use num_vlans where possible 2020-12-02 17:16:29 -08:00
ethernet dpaa_eth: fix build errorr in dpaa_fq_init 2020-12-04 10:23:02 -08:00
fddi
fjes
hamradio
hippi
hyperv Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-12-04 07:48:12 -08:00
ieee802154
ipa net: ipa: fix build-time bug in ipa_hardware_config_qsb() 2020-12-02 17:11:21 -08:00
ipvlan net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
mdio
netdevsim netdevsim: support ethtool ring and coalesce settings 2020-11-20 12:51:54 -08:00
pcs
phy net: phy: marvell: replace phy_modify() 2020-12-01 17:08:07 -08:00
plip
ppp
slip
team net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-11-27 18:25:27 -08:00
vmxnet3
wan net: wan: remove trailing semicolon in macro definition 2020-11-30 18:58:31 -08:00
wireguard
wireless wireless-drivers-next patches for v5.11 2020-12-04 10:56:37 -08:00
xen-netback
bareudp.c bareudp: constify device_type declaration 2020-12-02 18:00:18 -08:00
dummy.c
eql.c
geneve.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-12-03 15:44:09 -08:00
gtp.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macsec.c
macvlan.c macvlan: Support for high multicast packet rate 2020-12-03 08:21:29 -08:00
macvtap.c
Makefile
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-12-04 07:48:12 -08:00
veth.c Merge https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2020-12-04 07:48:12 -08:00
virtio_net.c xsk: Propagate napi_id to XDP socket Rx path 2020-12-01 00:09:25 +01:00
vrf.c vrf: add mac header for tunneled packets when sniffer is attached 2020-12-04 13:30:50 -08:00
vsockmon.c net: don't include ethtool.h from netdevice.h 2020-11-23 17:27:04 -08:00
vxlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2020-12-03 15:44:09 -08:00
xen-netfront.c xsk: Propagate napi_id to XDP socket Rx path 2020-12-01 00:09:25 +01:00