mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Fix crash at startup when dhcp-host with client-ids is present.
This commit is contained in:
committed by
Simon Kelley
parent
dc27e148a1
commit
53c4c5c859
@@ -315,8 +315,9 @@ struct dhcp_config *find_config(struct dhcp_config *configs,
|
|||||||
return config;
|
return config;
|
||||||
|
|
||||||
/* dhcpcd prefixes ASCII client IDs by zero which is wrong, but we try and
|
/* dhcpcd prefixes ASCII client IDs by zero which is wrong, but we try and
|
||||||
cope with that here */
|
cope with that here. This is IPv4 only. context==NULL implies IPv4,
|
||||||
if (!(context->flags & CONTEXT_V6) && *clid == 0 && config->clid_len == clid_len-1 &&
|
see lease_update_from_configs() */
|
||||||
|
if ((!context || !(context->flags & CONTEXT_V6)) && *clid == 0 && config->clid_len == clid_len-1 &&
|
||||||
memcmp(config->clid, clid+1, clid_len-1) == 0 &&
|
memcmp(config->clid, clid+1, clid_len-1) == 0 &&
|
||||||
is_config_in_context(context, config))
|
is_config_in_context(context, config))
|
||||||
return config;
|
return config;
|
||||||
|
|||||||
Reference in New Issue
Block a user