[Babel-users] [PATCH] Fix restoring sysctls on shutdown.
Toke Høiland-Jørgensen
toke at toke.dk
Tue Aug 25 22:50:16 UTC 2015
The previous patch to only write sysctls when needed failed to restore
values that was 0 before being set by babeld. This fixes that.
Signed-off-by: Toke Høiland-Jørgensen <toke at toke.dk>
---
kernel_netlink.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel_netlink.c b/kernel_netlink.c
index d87ee0b..1b87e74 100644
--- a/kernel_netlink.c
+++ b/kernel_netlink.c
@@ -546,7 +546,7 @@ kernel_setup(int setup)
for(i=0; i<NUM_SYSCTLS; i++) {
s = &sysctl_settings[i];
- if(s->was && s->was != s->want) {
+ if(s->was >= 0 && s->was != s->want) {
rc = write_proc(s->name,s->was);
if(rc < 0) {
perror("Couldn't write sysctl");
--
2.5.0
More information about the Babel-users
mailing list