# 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 
- List: netdev
- Page: https://ratatoskr.run/netdev/2026/11/17875550
- Thread: https://ratatoskr.run/netdev/2026/11/17870111/t.md

```text
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.
```
