From 6528f50bfc5ec41e6a7dfd368b5f220bf1727b22 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 11 Mar 2019 16:17:38 +0100 Subject: [PATCH] sculpt: NIC ready only with IP other than 0.0.0.0 This patch refines the criterion of when the networking is considered as ready to use. Until now, any IP reported by the NIC router was taken as an indicator for connectivity. But as the NIC router reports an IP 0.0.0.0/32 when no network cable is plugged at the uplink, the condition was too loose. --- repos/gems/src/app/sculpt_manager/model/nic_state.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repos/gems/src/app/sculpt_manager/model/nic_state.h b/repos/gems/src/app/sculpt_manager/model/nic_state.h index 6f5a8a932b..850976d4f4 100644 --- a/repos/gems/src/app/sculpt_manager/model/nic_state.h +++ b/repos/gems/src/app/sculpt_manager/model/nic_state.h @@ -35,7 +35,7 @@ struct Sculpt::Nic_state return Nic_state { result }; } - bool ready() const { return ipv4.valid(); } + bool ready() const { return ipv4.valid() && ipv4 != "0.0.0.0/32"; } }; #endif /* _MODEL__NIC_STATE_H_ */