stubby: Restart on interface trigger
authorAquila Cooper <aquila@cpr.is>
Sat, 7 Jan 2023 11:34:00 +0000 (11:34 +0000)
committerGitHub <noreply@github.com>
Sat, 7 Jan 2023 11:34:00 +0000 (11:34 +0000)
Cherry-picked from commit 3c04a6d235346f82b9c5a79baeee1367eeb2a979.

Force restart stubby if any of the trigger interfaces goes up or down. Avoids DoT DNS lookup timeouts when default route changes, in case of multiple
upstream interfaces.

Signed-off-by: Aquila Cooper <aquila@cpr.is>
net/stubby/files/stubby.init

index 5d0574aedb6bffc88dff1ded3023876fb8d2774c..57429050020284f5caffa6d5005cd4351dbec0e6 100755 (executable)
@@ -270,7 +270,7 @@ service_triggers()
 
     for trigger_item in $trigger
     do
-        procd_add_interface_trigger "interface.*.up" "$trigger_item" "$stubby_init" start
+        procd_add_interface_trigger "interface.*" "$trigger_item" "$stubby_init" restart
     done
 
     procd_add_reload_trigger "stubby"