diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index cacd867f9b0..ac1781d83ee 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -590,7 +590,8 @@ static int dhcp4_set_hostname(Link *link) { } static bool promote_secondaries_enabled(const char *ifname) { - char *promote_secondaries_sysctl, *promote_secondaries_path; + _cleanup_free_ char *promote_secondaries_sysctl = NULL; + char *promote_secondaries_path; int r; promote_secondaries_path = strjoina("net/ipv4/conf/", ifname, "/promote_secondaries"); @@ -627,7 +628,7 @@ int dhcp4_set_promote_secondaries(Link *link) { * interface. If it is not globally enabled or enabled for the * specific interface we must either enable it. */ - if (!(promote_secondaries_enabled("all") || promote_secondaries_enabled("default") || promote_secondaries_enabled(link->ifname))) { + if (!(promote_secondaries_enabled("all") || promote_secondaries_enabled(link->ifname))) { char *promote_secondaries_path = NULL; log_link_debug(link, "promote_secondaries is unset, setting it"); diff --git a/sysctl.d/50-default.conf b/sysctl.d/50-default.conf index aff99300d94..e263cf06284 100644 --- a/sysctl.d/50-default.conf +++ b/sysctl.d/50-default.conf @@ -22,15 +22,12 @@ kernel.sysrq = 16 kernel.core_uses_pid = 1 # Source route verification -net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.all.rp_filter = 1 # Do not accept source routing -net.ipv4.conf.default.accept_source_route = 0 net.ipv4.conf.all.accept_source_route = 0 # Promote secondary addresses when the primary address is removed -net.ipv4.conf.default.promote_secondaries = 1 net.ipv4.conf.all.promote_secondaries = 1 # Fair Queue CoDel packet scheduler to fight bufferbloat