Re: nc(1), GNU netcat and FIN segments after all data has been sent

2011-06-24 Thread Andreas Bartelt
On 06/23/11 21:05, Christopher Zimmermann wrote: ... Maybe you can force nc(1) not to send a FIN segment by using something like this: cat infile - |nc host 1234 This works. Thanks!

nc(1), GNU netcat and FIN segments after all data has been sent

2011-06-23 Thread Andreas Bartelt
Hello, I've noticed that there's a difference in behavior between nc(1) and GNU netcat when they talk to some daemon via TCP. The commands in the following example are basically the same: GNU netcat: netcat host 1234 infile nc(1): nc host 1234 infile nc(1) sends a FIN segment after all

Re: nc(1), GNU netcat and FIN segments after all data has been sent

2011-06-23 Thread Theo de Raadt
I've noticed that there's a difference in behavior between nc(1) and GNU netcat when they talk to some daemon via TCP. Note there are 3 netcats. There was the original non-free one by Hobbit; he did not want to free it and the code was quite a mish-mash. Then there was our rewrite, which is

Re: nc(1), GNU netcat and FIN segments after all data has been sent

2011-06-23 Thread Andreas Bartelt
Hi Theo, On 06/23/11 18:30, Theo de Raadt wrote: ... I've noticed that some daemons behave differently because of this, i.e., they won't return any data although they are still allowed to send data. Yes, those daemons are broken. Their select/poll loops are unaware that writeability and

Re: nc(1), GNU netcat and FIN segments after all data has been sent

2011-06-23 Thread Christopher Zimmermann
On 06/23/11 14:10, Andreas Bartelt wrote: Hello, I've noticed that there's a difference in behavior between nc(1) and GNU netcat when they talk to some daemon via TCP. The commands in the following example are basically the same: GNU netcat: netcat host 1234 infile nc(1): nc host