Re: Bug with FIONREAD for TCP?

From: Clayton, Mark (mclayton@hjinc.com)
Date: Mon Apr 10 2000 - 07:54:05 EST


On a side note, raw sockets don't have an ioctl interface.
So calls ioctl with FIONREAD returns an error. I emailed
this list a patch to add this support, but I never saw any
replies. Shouldn't a raw socket yield a size on a FIONREAD
call?

Thanks,
Mark Clayton

>
> From: "David S. Miller" <davem@redhat.com>
> Date: Mon, 10 Apr 2000 02:07:02 -0700
> Subject: Re: Bug with FIONREAD for TCP?
>
> Date: Mon, 10 Apr 2000 00:15:20 -0600
> From: Richard Gooch <rgooch@ras.ucalgary.ca>
>
> Hi, all. For at least a month or two I've noticed that FIONREAD
> yields 1 byte on a freshly closed TCP connection, rather than 0.
>
> The server creates a socket, binds to a port and listens and
> accepts the first connection. It does a select(2) on the FD, and
> upon an input event, calls ioctl(2) with FIONREAD. This yields 1
> byte readable. Any attempt to read that byte fails, as it's not
> really there.
>
> It's the sequence byte taken up by the initial SYN. It's probably
> wrong.
>
> I don't know if other systems report it this way too, do you have a
> way to check this out?
>
> Later,
> David S. Miller
> davem@redhat.com
>

--
Mark Clayton                 mclayton@hjinc.com
Harris & Jeffries, Inc.	     http://www.hjinc.com
888 Washington Street	     Tel: (781) 329-3200
Dedham MA 02026		     Fax: (781) 329-4148

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:14 EST