X Tutup
Skip to content

Commit 230450d

Browse files
lkundrakpoettering
authored andcommitted
sysctl.d: switch net.ipv4.conf.all.rp_filter from 1 to 2
This switches the RFC3704 Reverse Path filtering from Strict mode to Loose mode. The Strict mode breaks some pretty common and reasonable use cases, such as keeping connections via one default route alive after another one appears (e.g. plugging an Ethernet cable when connected via Wi-Fi). The strict filter also makes it impossible for NetworkManager to do connectivity check on a newly arriving default route (it starts with a higher metric and is bumped lower if there's connectivity). Kernel's default is 0 (no filter), but a Loose filter is good enough. The few use cases where a Strict mode could make sense can easily override this. The distributions that don't care about the client use cases and prefer a strict filter could just ship a custom configuration in /usr/lib/sysctl.d/ to override this.
1 parent 0d34228 commit 230450d

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

NEWS

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ CHANGES WITH 240 in spe:
7070
glibc is going to make it available too. This locale enables UTF-8
7171
mode by default, which appears appropriate for 2018.
7272

73+
* The "net.ipv4.conf.all.rp_filter" sysctl will now be set to 2 by
74+
default. This effectively switches the RFC3704 Reverse Path filtering
75+
from Strict mode to Loose mode. This is more appropriate for hosts
76+
that have multiple links with routes to the same networks (e.g.
77+
a client with a Wi-Fi and Ethernet both connected to the internet).
78+
79+
Consult the kernel documetnation for details on this sysctl:
80+
https://www.kernel.org/doc/Documentation/networking/ip-sysctl.txt
81+
7382
CHANGES WITH 239:
7483

7584
* NETWORK INTERFACE DEVICE NAMING CHANGES: systemd-udevd's "net_id"

sysctl.d/50-default.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ kernel.sysrq = 16
2222
kernel.core_uses_pid = 1
2323

2424
# Source route verification
25-
net.ipv4.conf.all.rp_filter = 1
25+
net.ipv4.conf.all.rp_filter = 2
2626

2727
# Do not accept source routing
2828
net.ipv4.conf.all.accept_source_route = 0

0 commit comments

Comments
 (0)
X Tutup