GNOME Bugzilla – Bug 761302
hostname-as-IP-address becomes weird search domain in DNS
Last modified: 2016-02-01 09:33:19 UTC
# Generated by NetworkManager search openstacklocal 1.0.3 nameserver 10.1.4.30 "1.0.3" is a pretty odd search domain, and that's apparently because the system hostname is actually "192.1.0.3" as reported by "sysctl -a". If the hostname looks like an IP address, we probably shouldn't do the search domain magic in src/dns-manager/nm-dns-manager.c::update_dns().
Created attachment 320031 [details] [review] dns: don't add and IPv4 addresss like hostname to the search domains
LGTM
merged: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=da4ae74fff1e931b257d3dc1473cb06de690af72 note I changed to AF_INET to AF_UNSPEC, to also reject hostnames that look like an ipv6 address.