Date: Thu, 23 Aug 2001 13:41:06 +0200 From: Gerhard Butscher <gerhard.butscher@esk.fhg.de> To: "H. Peter Anvin" <hpa@zytor.com> Cc: syslinux@linux.kernel.org, net@FreeBSD.ORG Subject: Re: TFTP sorcerer's apprentice syndrome Message-ID: <3B84EBD2.AF9429F9@esk.fhg.de> References: <3B78F5E1.475FF891@esk.fhg.de> <3B795499.4050307@zytor.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hello Peter, Now I used the tftp-hpa-0.21 client with a tftp server (SuSE 6.4, where a tftpd runs in whose binary code I found: tftp-hpa $Id: tftd.c,v 1.4 1999/09/26 07:12:54 hpa Exp). I inserted in tftp/tftp.c after line 285 if (dp->th_block == block) { following lines: if (block == 1) { sleep(6); } So the first ACK is delayed and the server sends DATA block # 1 again. The duplicate ACKs and DATA packets remain until ACK block # 09 and DATA block # 0a So it is not the syndrome until the end of the transfer, but for the first 10 packets (in this special setup). I don't know how the syndrome is resolved in this case (by server or by client?). (This can be seen with tftp options trace,verbose on or with tcpdump). Of course in this case it doesn't matter if whithin a part of a second 10 data packets and 10 acks are duplicated. But I am still not sure if the server conforms with the RFC. Gerhard A part of tcpdump output follows: 09:32:12.632661 client.registrar > server.tftp: 23 RRQ "/tftpboot/file" 4500 0033 4ebd 0000 4011 278a c0a8 4217 c0a8 410b 06b0 0045 001f 6e36 0001 2f74 6674 7062 6f6f 742f 6669 6c65 006f 6374 6574 00 09:32:12.680322 server.1043 > client.registrar: udp 516 4500 0220 67d0 0000 4011 0c8a c0a8 410b c0a8 4217 0413 06b0 020c cefe 0003 0001 b8c0 078e d8b8 0090 8ec0 b900 0129 f629 fffc f3a5 ea19 09:32:17.680152 server.1043 > client.registrar: udp 516 4500 0220 6852 0000 4011 0c08 c0a8 410b c0a8 4217 0413 06b0 020c cefe 0003 0001 b8c0 078e d8b8 0090 8ec0 b900 0129 f629 fffc f3a5 ea19 09:32:18.687882 client.registrar > server.1043: udp 4 4500 0020 55b1 0000 4011 20a9 c0a8 4217 c0a8 410b 06b0 0413 000c f09a 0004 0001 0000 0000 0000 0000 0000 0000 0000 09:32:18.688000 client.registrar > server.1043: udp 4 4500 0020 55b2 0000 4011 20a8 c0a8 4217 c0a8 410b 06b0 0413 000c f09a 0004 0001 0000 0000 0000 0000 0000 0000 0000 09:32:18.688095 server.1043 > client.registrar: udp 516 4500 0220 686b 0000 4011 0bef c0a8 410b c0a8 4217 0413 06b0 020c 41fd 0003 0002 eb24 4864 7253 0102 0000 0000 0010 0903 0001 0080 0000 09:32:18.688237 server.1043 > client.registrar: udp 516 4500 0220 686c 0000 4011 0bee c0a8 410b c0a8 4217 0413 06b0 020c 41fd 0003 0002 eb24 4864 7253 0102 0000 0000 0010 0903 0001 0080 0000 09:32:18.688537 client.registrar > server.1043: udp 4 4500 0020 55b4 0000 4011 20a6 c0a8 4217 c0a8 410b 06b0 0413 000c f099 0004 0002 0000 0000 0000 0000 0000 0000 0000 09:32:18.688618 server.1043 > client.registrar: udp 516 4500 0220 686d 0000 4011 0bed c0a8 410b c0a8 4217 0413 06b0 020c 9f54 0003 0003 0303 2ef6 0611 0001 7402 eb25 b800 018c cd83 ed20 2e8b 09:32:18.688653 client.registrar > server.1043: udp 4 4500 0020 55b6 0000 4011 20a4 c0a8 4217 c0a8 410b 06b0 0413 000c f099 0004 0002 0000 0000 0000 0000 0000 0000 0000 09:32:18.688800 server.1043 > client.registrar: udp 516 4500 0220 686e 0000 4011 0bec c0a8 410b c0a8 4217 0413 06b0 020c 9f54 0003 0003 0303 2ef6 0611 0001 7402 eb25 b800 018c cd83 ed20 2e8b 09:32:18.689040 client.registrar > server.1043: udp 4 4500 0020 55b7 0000 4011 20a3 c0a8 4217 c0a8 410b 06b0 0413 000c f098 0004 0003 0000 0000 0000 0000 0000 0000 0000 09:32:18.689134 server.1043 > client.registrar: udp 516 4500 0220 686f 0000 4011 0beb c0a8 410b c0a8 4217 0413 06b0 020c 5275 0003 0004 6d65 6d6f 7279 2e20 2047 6976 696e 6720 7570 2e00 6651 09:32:18.689208 client.registrar > server.1043: udp 4 4500 0020 55b8 0000 4011 20a2 c0a8 4217 c0a8 410b 06b0 0413 000c f098 0004 0003 0000 0000 0000 0000 0000 0000 0000 09:32:18.689298 server.1043 > client.registrar: udp 516 4500 0220 6870 0000 4011 0bea c0a8 410b c0a8 4217 0413 06b0 020c 5275 0003 0004 6d65 6d6f 7279 2e20 2047 6976 696e 6720 7570 2e00 6651 09:32:18.689553 client.registrar > server.1043: udp 4 4500 0020 55ba 0000 4011 20a0 c0a8 4217 c0a8 410b 06b0 0413 000c f097 0004 0004 0000 0000 0000 0000 0000 0000 0000 09:32:18.689633 server.1043 > client.registrar: udp 516 4500 0220 6871 0000 4011 0be9 c0a8 410b c0a8 4217 0413 06b0 020c 1481 0003 0005 6a0d 813c fdff 7433 88d0 e846 fae8 3efa ade8 c505 e837 09:32:18.689699 client.registrar > server.1043: udp 4 4500 0020 55bb 0000 4011 209f c0a8 4217 c0a8 410b 06b0 0413 000c f097 0004 0004 0000 0000 0000 0000 0000 0000 0000 09:32:18.689784 server.1043 > client.registrar: udp 516 4500 0220 6872 0000 4011 0be8 c0a8 410b c0a8 4217 0413 06b0 020c 1481 0003 0005 6a0d 813c fdff 7433 88d0 e846 fae8 3efa ade8 c505 e837 09:32:18.690045 client.registrar > server.1043: udp 4 4500 0020 55bc 0000 4011 209e c0a8 4217 c0a8 410b 06b0 0413 000c f096 0004 0005 0000 0000 0000 0000 0000 0000 0000 09:32:18.690183 client.registrar > server.1043: udp 4 4500 0020 55bd 0000 4011 209d c0a8 4217 c0a8 410b 06b0 0413 000c f096 0004 0005 0000 0000 0000 0000 0000 0000 0000 09:32:18.690399 server.1043 > client.registrar: udp 516 4500 0220 6873 0000 4011 0be7 c0a8 410b c0a8 4217 0413 06b0 020c 6cb5 0003 0006 04fe c3f6 e348 bad4 0389 c3b0 1288 dcef b007 e890 0386 09:32:18.690513 server.1043 > client.registrar: udp 516 4500 0220 6874 0000 4011 0be6 c0a8 410b c0a8 4217 0413 06b0 020c 6cb5 0003 0006 04fe c3f6 e348 bad4 0389 c3b0 1288 dcef b007 e890 0386 09:32:18.690801 client.registrar > server.1043: udp 4 4500 0020 55be 0000 4011 209c c0a8 4217 c0a8 410b 06b0 0413 000c f095 0004 0006 0000 0000 0000 0000 0000 0000 0000 09:32:18.690920 client.registrar > server.1043: udp 4 4500 0020 55bf 0000 4011 209b c0a8 4217 c0a8 410b 06b0 0413 000c f095 0004 0006 0000 0000 0000 0000 0000 0000 0000 09:32:18.690967 server.1043 > client.registrar: udp 516 4500 0220 6875 0000 4011 0be5 c0a8 410b c0a8 4217 0413 06b0 020c 019d 0003 0007 42ee 4a58 c38b 3e15 0c09 ff75 218d 3e6a 0d66 b800 0f19 09:32:18.691091 server.1043 > client.registrar: udp 516 4500 0220 6876 0000 4011 0be4 c0a8 410b c0a8 4217 0413 06b0 020c 019d 0003 0007 42ee 4a58 c38b 3e15 0c09 ff75 218d 3e6a 0d66 b800 0f19 09:32:18.691374 client.registrar > server.1043: udp 4 4500 0020 55c0 0000 4011 209a c0a8 4217 c0a8 410b 06b0 0413 000c f094 0004 0007 0000 0000 0000 0000 0000 0000 0000 09:32:18.691472 server.1043 > client.registrar: udp 516 4500 0220 6877 0000 4011 0be3 c0a8 410b c0a8 4217 0413 06b0 020c cac0 0003 0008 05e8 f1ff eb05 0430 e848 f488 e004 30e8 41f4 5958 c300 09:32:18.691503 client.registrar > server.1043: udp 4 4500 0020 55c1 0000 4011 2099 c0a8 4217 c0a8 410b 06b0 0413 000c f094 0004 0007 0000 0000 0000 0000 0000 0000 0000 09:32:18.691648 server.1043 > client.registrar: udp 516 4500 0220 6878 0000 4011 0be2 c0a8 410b c0a8 4217 0413 06b0 020c cac0 0003 0008 05e8 f1ff eb05 0430 e848 f488 e004 30e8 41f4 5958 c300 09:32:18.691886 client.registrar > server.1043: udp 4 4500 0020 55c2 0000 4011 2098 c0a8 4217 c0a8 410b 06b0 0413 000c f093 0004 0008 0000 0000 0000 0000 0000 0000 0000 09:32:18.691993 server.1043 > client.registrar: udp 516 4500 0220 6879 0000 4011 0be1 c0a8 410b c0a8 4217 0413 06b0 020c f718 0003 0009 fcfa b818 0000 008e d88e c08e e08e e866 09db 7413 8ed0 09:32:18.692058 client.registrar > server.1043: udp 4 4500 0020 55c3 0000 4011 2097 c0a8 4217 c0a8 410b 06b0 0413 000c f093 0004 0008 0000 0000 0000 0000 0000 0000 0000 09:32:18.692143 server.1043 > client.registrar: udp 516 4500 0220 687a 0000 4011 0be0 c0a8 410b c0a8 4217 0413 06b0 020c f718 0003 0009 fcfa b818 0000 008e d88e c08e e08e e866 09db 7413 8ed0 09:32:18.692401 client.registrar > server.1043: udp 4 4500 0020 55c4 0000 4011 2096 c0a8 4217 c0a8 410b 06b0 0413 000c f092 0004 0009 0000 0000 0000 0000 0000 0000 0000 09:32:18.692486 server.1043 > client.registrar: udp 516 4500 0220 687b 0000 4011 0bdf c0a8 410b c0a8 4217 0413 06b0 020c feba 0003 000a 0000 00e9 c405 0000 0385 90fa ffff 8944 2abc 31db 899d 09:32:18.693031 client.registrar > server.1043: udp 4 4500 0020 55c6 0000 4011 2094 c0a8 4217 c0a8 410b 06b0 0413 000c f092 0004 0009 0000 0000 0000 0000 0000 0000 0000 09:32:18.693037 client.registrar > server.1043: udp 4 4500 0020 55c7 0000 4011 2093 c0a8 4217 c0a8 410b 06b0 0413 000c f091 0004 000a 0000 0000 0000 0000 0000 0000 0000 09:32:18.693145 server.1043 > client.registrar: udp 516 4500 0220 687c 0000 4011 0bde c0a8 410b c0a8 4217 0413 06b0 020c feba 0003 000a 0000 00e9 c405 0000 0385 90fa ffff 8944 2abc 31db 899d 09:32:18.693585 client.registrar > server.1043: udp 4 4500 0020 55c8 0000 4011 2092 c0a8 4217 c0a8 410b 06b0 0413 000c f091 0004 000a 0000 0000 0000 0000 0000 0000 0000 09:32:18.693664 server.1043 > client.registrar: udp 516 4500 0220 687d 0000 4011 0bdd c0a8 410b c0a8 4217 0413 06b0 020c 7cf7 0003 000b c785 58fa ffff 0100 0000 89d9 d3a5 58fa ffff 8b85 b4fa 09:32:18.694071 client.registrar > server.1043: udp 4 4500 0020 55c9 0000 4011 2091 c0a8 4217 c0a8 410b 06b0 0413 000c f090 0004 000b 0000 0000 0000 0000 0000 0000 0000 09:32:18.694151 server.1043 > client.registrar: udp 516 4500 0220 687e 0000 4011 0bdc c0a8 410b c0a8 4217 0413 06b0 020c b426 0003 000c eb62 8bb5 9cfa ffff 8b06 3b45 1073 31b1 0f3d ff00 0000 09:32:18.694561 client.registrar > server.1043: udp 4 4500 0020 55ca 0000 4011 2090 c0a8 4217 c0a8 410b 06b0 0413 000c f08f 0004 000c 0000 0000 0000 0000 0000 0000 0000 "H. Peter Anvin" schrieb: > > Gerhard Butscher wrote: > > Hello, > > > > I am using the linux (SuSE 7.0) tftp server with an embedded > > tftp client (running on an embedded target). I changed that > > client code and caused by that change a considerable amount of > > delay. And the Sorcerer's Apprentice Syndrome appeared: > > > >>From that point where the server has sent a duplicate data > > packet (after the client's ACK timed out), there were always > > duplicate data (and of course ACK) packets until the end > > of the file transfer. > > > > I am not a protocol expert nor a unix programming expert > > but as far as I understand the tftp server code (e.g. > > tftp-hpa-0.21) there is a handling for duplicate ACK packets. > > But (maybe) not exactly the handling proposed by the RFC 1350. > > > > It's hard to know if this really is Sorcerer's Apprentice without seeing > a trace of the traffic. There are other pathologies that can cause this. > > Besides, you're talking about the "SuSE 7.0 tftp server", which > definitely isn't tftp-hpa-0.21, so I don't know what baseline code > you're talking about. > > -hpa > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-net" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B84EBD2.AF9429F9>