Comment 34 for bug 632896

Revision history for this message
In , Bojan (bojan-redhat-bugs) wrote :

Shouldn't the correct behaviour here be:

1. If network connected, set hostname to point to the actual IPs received from various connections. 127.0.0.1/::1 points to localhost only. For example:

127.0.0.1 localhost.locadomain localhost
::1 localhost6.localdomain6 localhost6
1.1.1.1 hostname.domain hostname
2.2.2.2 hostname.domain hostname

2. If network not connected, set hostname to point to 127.0.0.1/::1.

127.0.0.1 hostname.domain hostname localhost.locadomain localhost
::1 hostname.domain hostname localhost6.localdomain6 localhost6

No?

PS. This is useful when one pings itself, for instance. Correct IP replies. Also, if someone (e.g. a developer) configured a virtual host with the name of the box on the IP in question, there will be problems getting to it using the name from the box itself, because 127.0.0.1/::1 will be used instead of the real address.