Re: inet_listen incompatibility.

Andi Kleen (ak@muc.de)
27 Oct 1997 09:33:46 +0100


alan@lxorguk.ukuu.org.uk (Alan Cox) writes:

> > However, the code for inet_listen() in net/ipv4/af_inet.c (kernel version
> > 2.1.59) reads, starting at line 290:
> >
> > if (sock->state != SS_UNCONNECTED || sock->type != SOCK_STREAM)
> > return(-EINVAL);
> >
> > Shouldn't this be:
> >
> > if (sock->state != SS_UNCONNECTED ||
> > (sock->type != SOCK_STREAM && sock->type != SOCK_SEQPACKET))
> > return(-EINVAL);
> >
> > according to the manpage?
>
> No. There are no SOCK_SEQPACKET protocols as such in TCP/IP - examples
> of sequenced packet protocols can be found elsewhere - X.25, AX.25 and
> the Caldera SPX for example
>
> (the fact linux allows a sock_seqpacket create in IP is the actual
> bug I suspect ...)

I already fixed this for IPv6 in the CVS tree and have it for IPv4 at home
(so it'll be merged soon, when I'm back).

-A.