summaryrefslogtreecommitdiff
path: root/src/libsystemd-dhcp
diff options
context:
space:
mode:
Diffstat (limited to 'src/libsystemd-dhcp')
-rw-r--r--src/libsystemd-dhcp/sd-dhcp-client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-dhcp/sd-dhcp-client.c b/src/libsystemd-dhcp/sd-dhcp-client.c
index 7e5c36a857..8115b7f769 100644
--- a/src/libsystemd-dhcp/sd-dhcp-client.c
+++ b/src/libsystemd-dhcp/sd-dhcp-client.c
@@ -760,7 +760,7 @@ static int client_parse_offer(uint8_t code, uint8_t len, const uint8_t *option,
break;
case DHCP_OPTION_DOMAIN_NAME_SERVER:
- if (len >= 4) {
+ if (len && !(len % 4)) {
unsigned i;
lease->dns_size = len / 4;