Re: select refuses connection with datagrams

Alan Cox (alan@lxorguk.ukuu.org.uk)
Sat, 3 Oct 1998 21:18:05 +0100 (BST)


> of years. It involves basic networking functionality. I have tried for a
> long time to figure out what is wrong but I just can not figure out the
> problem. Basically, if you send a datagram with the function sendto you
> periodically get the error "Connection refused".

The difference is the Linux developers read the RFC documents, the other
vendors didnt. When an ICMP unreach is reported by the network you
are told about it at the next point POSIX 1003.1g says an error should be
reported. This means you can actualyl do things like see network problems
and downed servers properly.

You can get the BSD behaviour too since for some apps the cost to fix is
just too high

int one=1;

setsockopt(sock_fd, SOL_SOCKET, SO_BSDCOMPAT, &one, sizeof(one));

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