summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Brüns <stefan.bruens@rwth-aachen.de>2015-08-30 18:47:17 +0300
committercodewalker <codewalker@hardkernel.com>2017-06-01 11:48:08 +0300
commit0d3c865134b97b2f9e6793170f905fc6232f23b9 (patch)
tree707820835c3c9e9ee29ff4f861d22eb2bd1bbf00
parent682f736d12ba52ad06830fc22637d51fb360e2ab (diff)
downloadu-boot-0d3c865134b97b2f9e6793170f905fc6232f23b9.tar.xz
BACKPORT: 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. Change-Id: I0f61c7d1a2b82e11754151dd0e2379e009fe66d4 Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Signed-off-by: Dongjin Kim <tobetter@gmail.com>
-rw-r--r--net/bootp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/bootp.c b/net/bootp.c
index bf5d71eea0..e3b6da5088 100644
--- a/net/bootp.c
+++ b/net/bootp.c
@@ -994,6 +994,7 @@ DhcpHandler(uchar *pkt, unsigned dest, IPaddr_t sip, unsigned src,
dhcp_state = BOUND;
printf("DHCP client bound to address %pI4 (%lu ms)\n",
&NetOurIP, get_timer(bootp_start));
+ NetSetTimeout(0, (thand_f *)0);
bootstage_mark_name(BOOTSTAGE_ID_BOOTP_STOP,
"bootp_stop");