host: avoid running connect timer if the network is not up
authorFelix Fietkau <nbd@nbd.name>
Tue, 16 Aug 2022 18:31:16 +0000 (20:31 +0200)
committerFelix Fietkau <nbd@nbd.name>
Tue, 23 Aug 2022 21:20:25 +0000 (23:20 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
host.c

diff --git a/host.c b/host.c
index 6f5c0af45f358c07df01b45a1ff9cb5a75e7da5c..bef8863292cfca764343a48c0f6dc7e0006abe26 100644 (file)
--- a/host.c
+++ b/host.c
@@ -234,7 +234,7 @@ network_hosts_connect_cb(struct uloop_timeout *t)
                host->peer.state.num_net_queries = 0;
        net->num_net_queries = 0;
 
-       if (!net->net_config.keepalive)
+       if (!net->net_config.keepalive || !net->net_config.local_host)
                return;
 
        wg_peer_refresh(net);