mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-25 23:21:33 +03:00
Merge pull request #7547 from hvenev/sysctl-no-net-default
Do not set `net.ipv4.conf.default.*`
This commit is contained in:
commit
c072c6d39a
@ -590,7 +590,8 @@ static int dhcp4_set_hostname(Link *link) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool promote_secondaries_enabled(const char *ifname) {
|
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;
|
int r;
|
||||||
|
|
||||||
promote_secondaries_path = strjoina("net/ipv4/conf/", ifname, "/promote_secondaries");
|
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
|
* interface. If it is not globally enabled or enabled for the
|
||||||
* specific interface we must either enable it.
|
* 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;
|
char *promote_secondaries_path = NULL;
|
||||||
|
|
||||||
log_link_debug(link, "promote_secondaries is unset, setting it");
|
log_link_debug(link, "promote_secondaries is unset, setting it");
|
||||||
|
@ -22,15 +22,12 @@ kernel.sysrq = 16
|
|||||||
kernel.core_uses_pid = 1
|
kernel.core_uses_pid = 1
|
||||||
|
|
||||||
# Source route verification
|
# Source route verification
|
||||||
net.ipv4.conf.default.rp_filter = 1
|
|
||||||
net.ipv4.conf.all.rp_filter = 1
|
net.ipv4.conf.all.rp_filter = 1
|
||||||
|
|
||||||
# Do not accept source routing
|
# Do not accept source routing
|
||||||
net.ipv4.conf.default.accept_source_route = 0
|
|
||||||
net.ipv4.conf.all.accept_source_route = 0
|
net.ipv4.conf.all.accept_source_route = 0
|
||||||
|
|
||||||
# Promote secondary addresses when the primary address is removed
|
# Promote secondary addresses when the primary address is removed
|
||||||
net.ipv4.conf.default.promote_secondaries = 1
|
|
||||||
net.ipv4.conf.all.promote_secondaries = 1
|
net.ipv4.conf.all.promote_secondaries = 1
|
||||||
|
|
||||||
# Fair Queue CoDel packet scheduler to fight bufferbloat
|
# Fair Queue CoDel packet scheduler to fight bufferbloat
|
||||||
|
Loading…
Reference in New Issue
Block a user