From 4f28c9b169eb3dfa0981f58f9c649a03be39fda0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stefan=20Br=C3=BCns?= Date: Sun, 30 Aug 2015 17:47:17 +0200 Subject: [PATCH] net: cancel timeout handler after DHCPACK MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Acked-by: Joe Hershberger --- net/bootp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/bootp.c b/net/bootp.c index 1316f00dd8..5d1edf1dcb 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"); -- 2.25.1