Merge pull request #17474 from yuwata/network-drop-link-deserialization-logic

network: drop link deserialization logic
This commit is contained in:
Yu Watanabe
2020-11-27 09:08:01 +09:00
committed by GitHub
12 changed files with 86 additions and 434 deletions
+9
View File
@@ -212,6 +212,15 @@ int link_set_sysctl(Link *link) {
if (r < 0)
log_link_warning_errno(link, r, "Cannot set IPv4 accept_local flag for interface, ignoring: %m");
/* If promote_secondaries is not set, DHCP will work only as long as the IP address does not
* changes between leases. The kernel will remove all secondary IP addresses of an interface
* otherwise. The way systemd-networkd works is that the new IP of a lease is added as a
* secondary IP and when the primary one expires it relies on the kernel to promote the
* secondary IP. See also https://github.com/systemd/systemd/issues/7163 */
r = sysctl_write_ip_property_boolean(AF_INET, link->ifname, "promote_secondaries", true);
if (r < 0)
log_link_warning_errno(link, r, "Cannot enable promote_secondaries for interface, ignoring: %m");
return 0;
}