tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mapping ICMP codes to Unix errno code numbers



On Mar 25, 2013, at 2:46 PM, "Erik E. Fair" <fair%netbsd.org@localhost> wrote:
> I just filed PR kern/47693 which deals with an immediate deficiency
> in our ICMP handling - we don't handle unreachable code 13 valid
> code as valid. That needs to be fixed ASAP, and the patch pulled
> up to both netbsd-6 and netbsd-5.

Just don't do what Linux did and start returning EHOSTUNREACH when transmitting 
UDP packets if an ICMP Port Unreachable has been received in response to 
previous messages transmitted on that socket.   This is completely useless 
because the errno mechanism provides no way to communicate *which* packet 
generated the ICMP response.   This is not a problem for TCP sessions, so I 
think your proposed fix is correct in that case.



Home | Main Index | Thread Index | Old Index