<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello,</p>
<p>I'm looking for help to understand an issue we are observing on
Ubuntu 22.04.</p>
<p>networkd is failing with "netdev could not be created: Invalid
argument" when I try to create either an ip6gre or vti6 device.</p>
<p>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.<br>
</p>
<p>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).<br>
</p>
<p>How to reproduce the problem (tested on Ubuntu 22.04 (jammy) with
systemd 249.11-0ubuntu3.11 and kernel 5.15.0-89-generic):<br>
</p>
<p>--- /etc/systemd/network/tun0.netdev ---<br>
[NetDev]<br>
Name=tun0<br>
Kind=ip6gre<br>
<br>
[Tunnel]<br>
Independent=true<br>
Local=fe80::1<br>
Remote=2001:dead:beef::2<br>
------</p>
<p>--- /etc/systemd/network/tun0.network ---<br>
[Match]<br>
Name=tun0<br>
<br>
[Network]<br>
LinkLocalAddressing=ipv6<br>
ConfigureWithoutCarrier=yes<br>
------</p>
<p>After restarting networkd I see this in the logs<br>
</p>
<span id="line-number-88">tun0: netdev could not be created: Invalid
argument<br>
</span><span id="line-number-89">tun0: netdev removed</span>
<p><span id="line-number-89">If we boot a kernel that doesn't have
[1], the interface tun0 is created.<br>
</span></p>
<p><span id="line-number-89">Here is the full log with debug enabled
<a class="moz-txt-link-freetext" href="https://paste.ubuntu.com/p/dPbPxgRThW/">https://paste.ubuntu.com/p/dPbPxgRThW/</a></span></p>
<p><span id="line-number-89">As I said, the problem seems to be
fixed already in systemd, but I'm looking for help to understand
what changes fixed it.<br>
The theory is that the netlink attributes used to configure the
tunnel local/remote IPs might be wrong.<br>
</span></p>
<p></p>
<p>This problem is documented here
<a class="moz-txt-link-freetext" href="https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2037667">https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2037667</a></p>
<p>Thanks in advance.<br>
</p>
<p>[1] -
<a class="moz-txt-link-freetext" href="https://github.com/torvalds/linux/commit/b0ad3c179059089d809b477a1d445c1183a7b8fe">https://github.com/torvalds/linux/commit/b0ad3c179059089d809b477a1d445c1183a7b8fe</a><br>
</p>
</body>
</html>