> Add tests writing single 4in4 Geneve GSO frames to tun devices with > UDP tunnel offloads enabled. > > tun_vnet_udptnl_proto uses a tap device: > > - outer_proto_ok: an outer IPv4 header, with or without an 802.1Q tag, > is accepted. > - outer_proto_bad: an outer ethertype that does not match the declared > tunnel type (IPv6 on an IPv4 tunnel, or NSH, with or without a VLAN > tag) is rejected with EINVAL. > > tun_vnet_udptnl_proto_l3 uses an IFF_TUN device with a tun_pi header, > so skb->protocol comes from userspace and there is no Ethernet header. > The outer IPv4 header carries options, as virtio_net_hdr_tnl_to_skb() > expects room for an Ethernet header before the outer transport header. > > - outer_proto_ok: tun_pi and the frame agree on IPv4, accepted. > - outer_proto_bad: tun_pi claims IPv6, or the IP version of the frame > is not 4 while tun_pi claims IPv4: rejected with EINVAL. > > Without the first patch of this series, both outer_proto_bad tests fail > because the kernel accepts the frames. > > Signed-off-by: Eric Dumazet <[email protected]>
Sashiko has reviewed this patch and found no issues. -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=3
