diff options
| author | Stefan Brüns <[email protected]> | 2015-08-30 17:47:17 +0200 |
|---|---|---|
| committer | Joe Hershberger <[email protected]> | 2015-10-28 14:58:13 -0500 |
| commit | 4f28c9b169eb3dfa0981f58f9c649a03be39fda0 (patch) | |
| tree | 958284cba4430b0468c33adeb2c967dadd323f6a | |
| parent | 45b47734a0788721c76e3bb621a5133554e0a640 (diff) | |
net: cancel timeout handler after DHCPACK
Timeout handler should be stopped after reception of DHCPACK. If "autoload"
is not set, the handler is immediately replaced by the TFTP handler,
otherwise it may trigger before the next boot stage begins.
Signed-off-by: Stefan Brüns <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
| -rw-r--r-- | net/bootp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bootp.c b/net/bootp.c index 1316f00dd84..5d1edf1dcb3 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -1018,6 +1018,7 @@ static void dhcp_handler(uchar *pkt, unsigned dest, struct in_addr sip, dhcp_state = BOUND; printf("DHCP client bound to address %pI4 (%lu ms)\n", &net_ip, get_timer(bootp_start)); + net_set_timeout_handler(0, (thand_f *)0); bootstage_mark_name(BOOTSTAGE_ID_BOOTP_STOP, "bootp_stop"); |
