Re: Linux TCP/IP stack.

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sun, 18 Jul 1999 15:54:52 +0100 (BST)


> >According to Stevens "Unix Network Programming" 2nd ed. v.1 pp151-153 the
> >arrival of something like HOSTUNREACHABLE would mark the socket as
> readable,
> >and a read on it will fail with errno set appropriately, but only arrival
> of
> >OOB data will mark an exception condition on the socket.

Thats a BSD unix "we dont have an API" problem

> Wietse Venema:
> >Postfix has to run on real machines in the real world, and therefore
> >we cannot blindly use Stevens or the RFC as gospel.

Wietse is all too right about this. There is no networking standard. BSD
tries to declare itself "the standard" but isnt standardised between versions
itself.

> >Under some conditions LINUX sets the exception bits instead of the
> >readable bits like everyone else does. This broke the satan port
> >scanner.
>
> So ... is this still the behaviour? If so, is it due to the kernel TCP/IP
> stack? If so, should it be modified?

Nothing to do with TCP. Very old Linuxes considered an error as an "exception"
this is not what BSD or current Linux does. POSIX 1003.1g draft 6.5 says
"exception" is specifically for urgent data from memory (I only read the
select not poll parts of such stuff ;))

Note that none of this is a tcp protocol issue but an API one

Alan

-
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/