Re: [PATCH net v3 6/8] selftests: net: tun: test UDP tunnel GSO on retyped devices

From
Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date
2026-11-06 04:25:53
Also in
virtualization
Reply to
Eric Dumazet, 2026-11-05
Eric Dumazet wrote:
Use TUNSETLINK to make the device type disagree with the tun/tap
framing, and check that the outer headers of UDP tunnel GSO frames are
still validated according to the framing:

- tun_vnet_udptnl_proto.outer_proto_link_type: tap device set to
  ARPHRD_NONE. Frames with an NSH outer ethertype, with or without a
  VLAN tag, are rejected. A valid outer IPv4 frame is accepted.
- tun_vnet_udptnl_proto_l3.outer_proto_link_type: IFF_TUN device set
  to ARPHRD_ETHER. An Ethernet frame behind the tun_pi header is
  rejected.

Without the patch "net: virtio: do not use dev->type to find the outer
L3 header", the frames expected to be rejected are accepted.

Signed-off-by: Eric Dumazet <edumazet@kernel.org>
Reviewed-by: Willem de Bruijn <willemb@google.com>

This TUNSETLINK ioctl is so odd. Changing dev->type but not really
changing the underlying link layer expectations, such as eth_type_trans.
Thread (16 messages) 16 messages, 3 authors, last reply 2d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help