dns: don't add an IP-addresss-like hostname to the search domains

https://bugzilla.gnome.org/show_bug.cgi?id=761302
This commit is contained in:
Thomas Haller 2016-01-29 19:21:51 +01:00
parent 4441dbf3f3
commit da4ae74fff

View file

@ -874,7 +874,8 @@ update_dns (NMDnsManager *self,
if (priv->hostname) {
const char *hostdomain = strchr (priv->hostname, '.');
if (hostdomain) {
if ( hostdomain
&& !nm_utils_ipaddr_valid (AF_UNSPEC, priv->hostname)) {
hostdomain++;
if (DOMAIN_IS_VALID (hostdomain))
add_string_item (rc.searches, hostdomain);