Commit 3664eca8 authored by Toke Høiland-Jørgensen's avatar Toke Høiland-Jørgensen Committed by Juliusz Chroboczek

Fix restoring sysctls on shutdown.

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: default avatarToke Høiland-Jørgensen <toke@toke.dk>
parent 5bf5bd83
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment