in reply to Re: udp send not reporting host unreachable errors
in thread udp send not reporting host unreachable errors
I agree that UDP is connection less. But RFC 1122, which mandates the behaviour of Linux for UDP protocol states that whenever ICMP error messages are received, they should be reported to the user application.
I do get "Connection refused" errors for sending data to a non existent UDP socket on a reachable host. Why shouldn't I get an error for a non existent port on an unreachable host?
And as per the content of my post, if SO_BSDCOMPAT option is on, then you get errors if and only if the destination host is up but there is some problem in connecting to the socket.
The UDP man page also states that SO_BSDCOMPAT option has been removed after Linux 2.2. I have Linux 2.6. So why is my application behaving as if SO_BSDCOMPAT option is set?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: udp send not reporting host unreachable errors
by JavaFan (Canon) on May 05, 2009 at 11:09 UTC | |
by saurabh.hirani (Beadle) on May 05, 2009 at 12:09 UTC | |
by roboticus (Chancellor) on May 05, 2009 at 16:32 UTC |