On Thu, 26 Feb 2004, Adrian Chadd wrote: > .. and thats it until the socket times out. > > Now, here's a tcpdump of my local conversation: > > 18:31:36.421730 127.0.0.1.33341 > 127.0.0.1.3128: S 2005892544:2005892544(0) win > 32767 <mss 16396,sackOK,timestamp 1399219195 0,nop,wscale 0> (DF) > 18:31:36.421766 127.0.0.1.3128 > 127.0.0.1.33341: S 2012731824:2012731824(0) ack > 2005892545 win 32767 <mss 16396,sackOK,timestamp 1399219195 1399219195,nop,wscale 0> > (DF) > 18:31:36.421787 127.0.0.1.33341 > 127.0.0.1.3128: . ack 1 win 32767 > <nop,nop,timestamp 1399219195 1399219195> (DF) > 18:31:36.422067 127.0.0.1.33341 > 127.0.0.1.3128: P 1:76(75) ack 1 win 32767 > <nop,nop,timestamp 1399219195 1399219195> (DF) > 18:31:36.422094 127.0.0.1.3128 > 127.0.0.1.33341: . ack 76 win 32767 > <nop,nop,timestamp 1399219195 1399219195> (DF) > > .. until, when I hit ctrl-C in netcat: > > 18:31:52.165995 127.0.0.1.33341 > 127.0.0.1.3128: F 76:76(0) ack 1 win 32767 > <nop,nop,timestamp 1399234941 1399219195> (DF) > 18:31:52.166321 127.0.0.1.3128 > 127.0.0.1.33341: F 1:1(0) ack 77 win 32767 > <nop,nop,timestamp 1399234942 1399234941> (DF) > 18:31:52.166413 127.0.0.1.33341 > 127.0.0.1.3128: . ack 2 win 32767 > <nop,nop,timestamp 1399234942 1399234942> (DF) > > Hm. What am I doing wrong?
No idea. This is not how netcat behaves here... here netcat closes the transmit channel when receiving EOF in stdin, seen as FIN directly after the PUSH. see any of traces sent earlier for packet level details. This is observed with a variety of different netcat incarnations, ranging from RedHat-7.1 to Fedora Core 1, and also when using the busybox netcat IIRC. Regards Henrik
