From f2bfa3b3aba781e0990ff592aebf36338b0ed821 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 20 Jun 2022 10:08:39 +0200 Subject: sys/linux: fix tunnel descriptions sit devices are ipv4 even that it's source is in net/ipv6. The address length is 4: https://elixir.bootlin.com/linux/v5.19-rc2/source/net/ipv6/sit.c#L1440 and it accepts ip_tunnel_prl instead of ip6_tnl_parm2 for SIOCADDTUNNEL: https://elixir.bootlin.com/linux/v5.19-rc2/source/net/ipv6/sit.c#L370 Also SIOC***PRL commands accept ip_tunnel_prl instead of ip6_tnl_parm2: https://elixir.bootlin.com/linux/v5.19-rc2/source/net/ipv6/sit.c#L457 and SIOC***6RD accept ip_tunnel_6rd struct: https://elixir.bootlin.com/linux/v5.19-rc2/source/net/ipv6/sit.c#L1169 and both SIOC***PRL and SIOC***6RD are only applicable to sit devices rather than all tunnel types: https://elixir.bootlin.com/linux/v5.19-rc2/A/ident/SIOCGET6RD --- sys/linux/socket_ip_tunnel.txt.const | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/linux/socket_ip_tunnel.txt.const') diff --git a/sys/linux/socket_ip_tunnel.txt.const b/sys/linux/socket_ip_tunnel.txt.const index 96acd057a..1f7d1993d 100644 --- a/sys/linux/socket_ip_tunnel.txt.const +++ b/sys/linux/socket_ip_tunnel.txt.const @@ -20,6 +20,7 @@ IP6_TNL_F_USE_ORIG_TCLASS = 2 IPPROTO_GRE = 47 IPPROTO_IPIP = 4 IPPROTO_IPV6 = 41 +PRL_DEFAULT = 1 SIOCADD6RD = 35321 SIOCADDPRL = 35317 SIOCADDTUNNEL = 35313 -- cgit mrf-deployment