]> git.ipfire.org Git - thirdparty/systemd.git/commit
network: Support interface-bound ECMP routes in MultiPathRoute=
authorChris Down <chris@chrisdown.name>
Fri, 14 Nov 2025 16:52:51 +0000 (00:52 +0800)
committerChris Down <chris@chrisdown.name>
Fri, 28 Nov 2025 11:09:15 +0000 (19:09 +0800)
commit645b709a383a475fae434acb0b4eb0558ecd2b15
treea44f1c7c8f7b38381023bc6f8ac1c5bc2b44e01f
parent68ce283c3f4a63696307cee9addd7b6c333efbd5
network: Support interface-bound ECMP routes in MultiPathRoute=

MultiPathRoute= can now specify device-only nexthops without a gateway
address, e.g. MultiPathRoute=@wg0. This enables ECMP configurations over
interfaces that don't use gateway addresses, such as WireGuard tunnels.

The syntax is extended from "address[@device] [weight]" to
"[address]@device [weight]". The address is now optional, but at least
one of gateway or device must be specified. The @ symbol must still be
present for device-only routes, making the syntax unambiguous: @wg0
specifies a device, while a bare IP address specifies a gateway.

Device-only nexthops are only available for IPv4 routes. Device-only
multipath routes for IPv6 are not supported by the kernel's netlink
interface and will be rejected with a warning.

This change is fully backwards compatible. All existing configurations
continue to work unchanged, as they always included a gateway address.

Closes #39699.
man/systemd.network.xml
src/network/networkd-route-nexthop.c