diff options
author | Thomas Haller <thaller@redhat.com> | 2018-04-12 13:45:49 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-04-12 13:48:12 +0200 |
commit | f92a68c9e50ad7a368f7b6259b785cdfa98aa77f (patch) | |
tree | 42cbab86982c40a3cc516d417cfa36ff451403a2 | |
parent | 150cf44d501c82810e7033b7a8278713919d1d89 (diff) |
device/trivial: add code comment to nm_device_ipv4_sysctl_get_effective_uint32()
-rw-r--r-- | src/devices/nm-device.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/devices/nm-device.c b/src/devices/nm-device.c index d205635984..c0540534e0 100644 --- a/src/devices/nm-device.c +++ b/src/devices/nm-device.c @@ -1060,6 +1060,11 @@ nm_device_ipv4_sysctl_get_effective_uint32 (NMDevice *self, const char *property if (!nm_device_get_ip_ifindex (self)) return fallback; + /* for this kind of sysctl (e.g. "rp_filter"), kernel effectively uses the + * MAX of the per-device value and the "all" value. + * + * Also do that, by reading both sysctls and return the maximum. */ + v = nm_platform_sysctl_get_int_checked (nm_device_get_platform (self), NMP_SYSCTL_PATHID_ABSOLUTE (nm_utils_sysctl_ip_conf_path (AF_INET, buf, |