wok-6.x rev 537
Busybox/dhcpc: do not hang on network failure
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Apr 10 19:43:50 2008 +0000 (2008-04-10) |
parents | 0b58f274eec1 |
children | 8d43117e4680 |
files | busybox/receipt busybox/stuff/busybox-1.10.0-dhcpc.u |
line diff
1.1 --- a/busybox/receipt Thu Apr 10 20:53:44 2008 +0200 1.2 +++ b/busybox/receipt Thu Apr 10 19:43:50 2008 +0000 1.3 @@ -17,6 +17,7 @@ 1.4 patch -p0 < stuff/$PACKAGE-$VERSION-patch.u 1.5 patch -p0 < stuff/$PACKAGE-$VERSION-vcsa2txt.u 1.6 patch -p0 < stuff/$PACKAGE-$VERSION-cpio.u 1.7 + patch -p0 < stuff/$PACKAGE-$VERSION-dhcpc.u 1.8 cp stuff/$PACKAGE-$VERSION.config $PACKAGE-$VERSION/.config 1.9 cd $PACKAGE-$VERSION 1.10 make oldconfig
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/busybox/stuff/busybox-1.10.0-dhcpc.u Thu Apr 10 19:43:50 2008 +0000 2.3 @@ -0,0 +1,15 @@ 2.4 +--- busybox-1.10.0/networking/udhcp/dhcpc.c 2.5 ++++ busybox-1.10.0/networking/udhcp/dhcpc.c 2.6 +@@ -377,7 +377,11 @@ 2.7 + xid = random_xid(); 2.8 + 2.9 + /* send discover packet */ 2.10 +- send_discover(xid, requested_ip); /* broadcast */ 2.11 ++ if (send_discover(xid, requested_ip) < 0) { /* broadcast */ 2.12 ++ bb_info_msg("No network, failing"); 2.13 ++ retval = 1; 2.14 ++ goto ret; 2.15 ++ } 2.16 + 2.17 + timeout = discover_timeout; 2.18 + packet_num++;