Skip to content

[th/dhcp-pref-src] dhcp: set "src" for DHCPv4 routes

Thomas Haller requested to merge th/dhcp-pref-src into main

Let's set the "src" (RTA_PREFSRC) of DHCP routes. This helps with source address selection.

This can matter if the interface also has static addresses configured.

Systemd-networkd also does this ([1], [2]).

[1] https://github.com/systemd/systemd/commit/ac2dce5f36bb8b1a877ff765e6a4dfde6bfb2d49 [2] https://github.com/systemd/systemd/blob/5b89bff55f45235f72d30d90fd489fe2247ad00d/src/network/networkd-dhcp4.c#L395

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1995372

Merge request reports

Loading