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.
This commit is contained in:
Norman Feske 2019-03-11 16:17:38 +01:00 committed by Christian Helmuth
parent 94e2a64f60
commit 6528f50bfc
1 changed files with 1 additions and 1 deletions

View File

@ -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_ */