Alan Cox (alan@lxorguk.ukuu.org.uk) Fri, 21 Nov 1997 12:45:13 +0000 (GMT):
> This seems exactly correct behaviour according to RFC 1122, but missing
> in BSD. You are seeing
>
> writev()
> send to a port that isnt there
> <- ICMP UNREACH
>
> writev()
> ahah pending error
> report the error
Linux shows some even more surprising behavior. I expected to see the
error messages that Christoph described, when trying to send UDP
datagrams to an unreachable host; but Linux really surprised me, when
I got the same error code (errno = 111, ECONNREFUSED) from a
"recvfrom(2)" call. It is not entirely obvious, how you can get a
"host unreachable" situation for an incoming datagram.
After running a "tcpdump(8)" trace, I finally found the problem. Solaris
2.5 can erroneously send outgoing UDP datagrams that advertise
127.0.0.1 as a from address. When my Linux box received these
datagrams, it would properly return them from a "recvfrom(2)" call,
but the very next "recvfrom(2)" would always fail with ECONNREFUSED.
I guess, this is correct behavior; but it seems very non-intuitive ;-)
Markus
-- Markus Gutschke Internet: markus@infoscape.com Infoscape, Inc Phone: +1-415-537-3778 657 Mission Street, Suite 200 San Francisco, CA 94105Disclaimer: The above message represents my personal opinion; It does not constitute an offical statement by Infoscape!
--pgp-sign-Multipart_Fri_Nov_21_10:58:06_1997-1 Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit
-----BEGIN PGP MESSAGE----- Version: 2.6.2
iQCVAwUBNHXZwxqJqDLErwMxAQEiAQP+JZZwVkv/l4Z6MSQPE1XmyzrctbjwCjbS bcUBNLM+DFjdLhW1CX8/SqfITccN9Rmo86chPQupNzyajbC6QClsayKdE0Wx3UUz uDjuOdb8iZFlsBOZJP8QQeArn+oNGAvniceZQCirWWM2zQCf05WpAUE1A313Sz5f XhBEkAs+5mc= =RgAT -----END PGP MESSAGE-----
--pgp-sign-Multipart_Fri_Nov_21_10:58:06_1997-1--