Hi, I have a problem with the wget of busybox 1.23.2. I have a network device with a mtu problem. When the mtu on ethernet interface is 1500, wget hangs and therefore fails to get the result (if the result is a long length answer). If I set the mtu to 1400, everything goes well. So, I thought it would be smarter I use the -T/--timeout option of wget in case of network failure. But the option doesn't make a difference. The busybox version of wget hangs with this option too. I tried with the GNU wget (1.16.3). With the same command, the timeout works well: --- [...] HTTP request sent, awaiting response... Read error (Connection timed out) in headers. Retrying. --- I used this command: --- wget -T 10 -O kernel.img http://mywebserver/pub/kernel.img --- My busybox config: --- 892:CONFIG_WGET=y 893:CONFIG_FEATURE_WGET_STATUSBAR=y 894:CONFIG_FEATURE_WGET_AUTHENTICATION=y 895:CONFIG_FEATURE_WGET_LONG_OPTIONS=y 896:CONFIG_FEATURE_WGET_TIMEOUT=y --- The strace (I modified the URL and the IP): --- strace wget -T 10 -O kernel.img http://mywebserver/pub/kernel.img execve("/usr/bin/wget", ["wget", "-T", "10", "-O", "kernel.img", "http://mywebserver/pub/k"...], [/* 15 vars */]) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x400b6000 open("/lib/libc.so.0", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0755, st_size=308988, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x400cf000 read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0(\0\1\0\0\0\20\241\0\0004\0\0\0"..., 4096) = 4096 mmap2(NULL, 360448, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40174000 mmap2(0x40174000, 304484, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0x40174000 mmap2(0x401c6000, 4840, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x4a) = 0x401c6000 mmap2(0x401c8000, 14192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x401c8000 close(3) = 0 munmap(0x400cf000, 4096) = 0 stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=25296, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|0x4000000, -1, 0) = 0x40067000 set_tls(0x40067480, 0x40067b20, 0x40067b28, 0x40067480, 0x40075f74) = 0 mprotect(0x401c6000, 4096, PROT_READ) = 0 mprotect(0x40075000, 4096, PROT_READ) = 0 ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0 getuid32() = 0 brk(0) = 0xaf000 brk(0xb1000) = 0xb1000 open("/etc/services", O_RDONLY) = 3 ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0xbeec197c) = -1 ENOTTY (Inappropriate ioctl for device) brk(0xb2000) = 0xb2000 read(3, "# /etc/services:\n# $Id: services"..., 4096) = 4096 close(3) = 0 open("/etc/hosts", O_RDONLY) = 3 ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0xbeec1394) = -1 ENOTTY (Inappropriate ioctl for device) read(3, "127.0.0.1\tlocalhost\n127.0.1.1\tmr"..., 4096) = 37 read(3, "", 4096) = 0 close(3) = 0 stat64("/etc/resolv.conf", {st_mode=S_IFREG|0644, st_size=40, ...}) = 0 open("/etc/resolv.conf", O_RDONLY) = 3 ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0xbeec105c) = -1 ENOTTY (Inappropriate ioctl for device) read(3, "search syscom.ch\nnameserver 192."..., 4096) = 40 read(3, "", 4096) = 0 close(3) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 3 connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.4.1")}, 16) = 0 send(3, "\0\2\1\0\0\1\0\0\0\0\0\0\10mywebserver"..., 49, 0) = 49 poll([{fd=3, events=POLLIN}], 1, 5000) = 1 ([{fd=3, revents=POLLIN}]) recv(3, "\0\2\201\200\0\1\0\1\0\0\0\0\10mywebserver"..., 512, MSG_DONTWAIT) = 65 close(3) = 0 brk(0xb3000) = 0xb3000 write(2, "Connecting to ", 14Connecting to ) = 14 write(2, "mywebserver", 11mywebserver) = 11 write(2, " (", 2 () = 2 write(2, "10.200.221.201:80", 1710.200.221.201:80) = 17 write(2, ")\n", 2) ) = 2 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3 connect(3, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("10.200.221.201")}, 16) = 0 fcntl64(3, F_GETFL) = 0x2 (flags O_RDWR) ioctl(3, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0xbeec1a14) = -1 ENOTTY (Inappropriate ioctl for device) write(3, "GET /pub/kernel.img"..., 125) = 125 read(3, ---
There was a TODO item to make -T timeout work on header reads too. Now fixed in git. Thanks.