From: Roy Marples Date: Tue, 24 Feb 2009 00:02:41 +0000 (+0000) Subject: Check carrier eariler. Thanks to Michael Olney. X-Git-Tag: v4.0.12~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99fec43320dddcd5885e543ba9e9cf2031a070b5;p=thirdparty%2Fdhcpcd.git Check carrier eariler. Thanks to Michael Olney. --- diff --git a/client.c b/client.c index 11b529f0..d14bd751 100644 --- a/client.c +++ b/client.c @@ -1261,6 +1261,8 @@ handle_timeout(struct if_state *state, const struct options *options) timerclear(&state->stop); /* FALLTHROUGH */ case STATE_INIT: + if (state->carrier == LINK_DOWN) + return 0; do_socket(state, SOCKET_OPEN); state->xid = arc4random(); iface->start_uptime = uptime(); @@ -1284,8 +1286,6 @@ handle_timeout(struct if_state *state, const struct options *options) } /* FALLTHROUGH */ case STATE_INIT: - if (state->carrier == LINK_DOWN) - return 0; if (lease->addr.s_addr == 0 || IN_LINKLOCAL(ntohl(iface->addr.s_addr))) {