[systemd-devel] networkd 249.11 fails to create ip6gre and vti6 tunnels

Danilo Egea Gondolfo danilo.egea.gondolfo at gmail.com
Mon Nov 27 17:37:52 UTC 2023


Hello,

I'm looking for help to understand an issue we are observing on Ubuntu 
22.04.

networkd is failing with "netdev could not be created: Invalid argument" 
when I try to create either an ip6gre or vti6 device.

We believe this problem started when we pulled this change [1] in to the 
kernel 5.15. The problem also happens with the most recent upstream 
kernel so it's not an issue introduced by Ubuntu.

The problem doesn't happen on recent versions of systemd but we'd like 
to fix it on systemd 249 (used by Ubuntu 22.04).

How to reproduce the problem (tested on Ubuntu 22.04 (jammy) with 
systemd 249.11-0ubuntu3.11 and kernel 5.15.0-89-generic):

--- /etc/systemd/network/tun0.netdev ---
[NetDev]
Name=tun0
Kind=ip6gre

[Tunnel]
Independent=true
Local=fe80::1
Remote=2001:dead:beef::2
------

--- /etc/systemd/network/tun0.network ---
[Match]
Name=tun0

[Network]
LinkLocalAddressing=ipv6
ConfigureWithoutCarrier=yes
------

After restarting networkd I see this in the logs

tun0: netdev could not be created: Invalid argument
tun0: netdev removed

If we boot a kernel that doesn't have [1], the interface tun0 is created.

Here is the full log with debug enabled 
https://paste.ubuntu.com/p/dPbPxgRThW/

As I said, the problem seems to be fixed already in systemd, but I'm 
looking for help to understand what changes fixed it.
The theory is that the netlink attributes used to configure the tunnel 
local/remote IPs might be wrong.

This problem is documented here 
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2037667

Thanks in advance.

[1] - 
https://github.com/torvalds/linux/commit/b0ad3c179059089d809b477a1d445c1183a7b8fe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20231127/09e2ae84/attachment.htm>


More information about the systemd-devel mailing list