]> git.ipfire.org Git - network.git/commitdiff
networkd: Enable the service watchdog
authorMichael Tremer <michael.tremer@ipfire.org>
Sun, 29 Jan 2023 21:53:19 +0000 (21:53 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sun, 29 Jan 2023 22:57:29 +0000 (22:57 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/networkd/daemon.c

index 25fdbdb7644aab7930b87d92990cdea8941e260e..c6acefe25dfcc62d42c0dee594cb12d5332ef5ff 100644 (file)
@@ -41,6 +41,13 @@ static int nw_daemon_setup_loop(struct nw_daemon* daemon) {
                return 1;
        }
 
+       // Enable the watchdog
+       r = sd_event_set_watchdog(daemon->loop, 1);
+       if (r < 0) {
+               //ERROR("Could not activate watchdog: %m\n");
+               return 1;
+       }
+
        return 0;
 }