Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

https://unix.stackexchange.com/questions/99336/how-does-ping...

Because it's special cased in ping. Because that's what a relevant RFC says to do.



Looking at the RFC it seems to say that { 0, 0 } means "this host on the network" and must not be sent except as a source address during initialization in order for the host to learn its own IP address. My interpretation is not that this means trying to ping 0.0.0.0 is supposed to be equivalent to 127.0.0.1, but just that you can't actually set your destination address to 0.0.0.0 when sending IP packets. Linux ping's interpretation of this as meaning to fall back to 127.0.0.1 when trying to ping 0.0.0.0 doesn't seem unreasonable, but nor does it seem to be mandated by the RFC.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: