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 e8cfd72c01fb3932eae4cc858d469618c668db42..6680d06736242f7db332495b2f5c03a0d82d3f27 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);