diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-05-08 20:53:39 +0000 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-05-08 20:53:39 +0000 |
| commit | 8c4d602b3f2513d928fa4f67d4c26545c879b7f8 (patch) | |
| tree | 819355380cbf4856bd265577f544ce065451ab8b /docs/_build/html/_static/basic.css | |
| parent | 8669f150028a223d88b3e1ddbbd752fd8cd028ac (diff) | |
| download | vyos-build-8c4d602b3f2513d928fa4f67d4c26545c879b7f8.tar.gz vyos-build-8c4d602b3f2513d928fa4f67d4c26545c879b7f8.zip | |
Kernel: T8605: net/l2tp: allow unmanaged tunnel setup without route to peer
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 <christian@breunig.cc>
Diffstat (limited to 'docs/_build/html/_static/basic.css')
0 files changed, 0 insertions, 0 deletions
