chiark / gitweb /
dhcp: the localhost isn't valid as hostname either
authorLennart Poettering <lennart@poettering.net>
Fri, 15 Aug 2014 01:05:44 +0000 (03:05 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 15 Aug 2014 01:10:20 +0000 (03:10 +0200)
src/libsystemd-network/sd-dhcp-lease.c

index e8cfd72..6680d06 100644 (file)
@@ -537,7 +537,7 @@ int dhcp_lease_parse_options(uint8_t code, uint8_t len, const uint8_t *option,
                 if (r < 0)
                         return r;
 
-                if (!hostname_is_valid(hostname))
+                if (!hostname_is_valid(hostname) || is_localhost(hostname))
                         break;
 
                 free(lease->hostname);