From ed4581e639d941405d1d03a299fa5d95b51e7695 Mon Sep 17 00:00:00 2001 From: everyx Date: Wed, 6 May 2026 10:24:17 +0800 Subject: [PATCH] Fix network initialization during system boot During Linux system boot, the network stack may not be fully initialized when sing-box starts. The original code would trigger NetworkPause() for missing default interface, preventing automatic recovery after network initialization completes. Skip pause handling when not started to allow proper initialization. --- route/network.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/route/network.go b/route/network.go index 03e94879bf..5d044a5f0b 100644 --- a/route/network.go +++ b/route/network.go @@ -479,7 +479,7 @@ func (r *NetworkManager) ResetNetwork() { } func (r *NetworkManager) notifyInterfaceUpdate(defaultInterface *control.Interface, flags int) { - if defaultInterface == nil { + if defaultInterface == nil && r.started { r.pauseManager.NetworkPause() r.logger.Error("missing default interface") return