<feed xmlns='http://www.w3.org/2005/Atom'>
<title>vyos-build.git/scripts/package-build/linux-kernel/patches/kernel/0004-l2tp-defer-route-at-tunnel-create.patch, branch rolling</title>
<subtitle>VyOS image build scripts (mirror of https://github.com/vyos/vyos-build.git)
</subtitle>
<id>https://git.amelek.net/vyos/vyos-build.git/atom?h=rolling</id>
<link rel='self' href='https://git.amelek.net/vyos/vyos-build.git/atom?h=rolling'/>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-build.git/'/>
<updated>2026-07-08T18:38:55+00:00</updated>
<entry>
<title>Kernel: T9067: Update Linux Kernel to 6.18.38</title>
<updated>2026-07-08T18:38:55+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2026-07-08T18:38:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-build.git/commit/?id=9ab08c84d113aec00c5114721d87cdcda46f187d'/>
<id>urn:sha1:9ab08c84d113aec00c5114721d87cdcda46f187d</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Kernel: T8605: net/l2tp: allow unmanaged tunnel setup without route to peer</title>
<updated>2026-05-08T20:53:39+00:00</updated>
<author>
<name>Christian Breunig</name>
<email>christian@breunig.cc</email>
</author>
<published>2026-05-08T20:53:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.amelek.net/vyos/vyos-build.git/commit/?id=8c4d602b3f2513d928fa4f67d4c26545c879b7f8'/>
<id>urn:sha1:8c4d602b3f2513d928fa4f67d4c26545c879b7f8</id>
<content type='text'>
Kernel-created L2TPv3 tunnels (genetlink L2TP_CMD_TUNNEL_CREATE without
L2TP_ATTR_FD) used udp_sock_create() and kernel_connect(), which invoke
__ip4_datagram_connect() / __ip6_datagram_connect(). Those paths insist on
a successful FIB lookup at connect time. If no route to the configured
remote existed yet, tunnel and interface creation failed.

The data path already resolves routes on transmit (e.g. __ip_queue_xmit(),
inet6_csk_route_socket()). This change defers requiring a route until
packets are sent.

Details:
- UDP encapsulation: bind with udp_sock_create() after zeroing peer_udp_port,
  then l2tp_udp_sk_set_peer() sets daddr/dport and socket "connected" state
  without caching sk_dst from connect.
- IPv4 L2TP/IP (l2tp_ip): on -ENETUNREACH / -EHOSTUNREACH from
  __ip4_datagram_connect(), l2tp_ip_connect_deferred() installs peer and
  bind-table updates without a connect-time route.
- IPv6 L2TP/IP (l2tp_ip6): same for __ip6_datagram_connect(), including
  IPv4-mapped peers and scope / bound-device checks aligned with the normal
  connect path.

Forwarding still only happens once the FIB can reach the peer. Until then
outgoing packets follow the existing no-route drop path.

Assisted-by: Cursor:claude-4.6-opus
Signed-off-by: Christian Breunig &lt;christian@breunig.cc&gt;
</content>
</entry>
</feed>
