mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-10-15 10:39:35 +00:00
Tweak ICMP ping check logic for DHCPv4.
This commit is contained in:
1 parent
2446514e71
commit
4bb68866a8
1 file changed
+1
-1
+1
-1
@@ -1040,7 +1040,7 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
|
||||
else if (have_config(config, CONFIG_DECLINED) &&
|
||||
difftime(now, config->decline_time) < (float)DECLINE_BACKOFF)
|
||||
my_syslog(MS_DHCP | LOG_WARNING, _("not using configured address %s because it was previously declined"), addrs);
|
||||
else if (!do_icmp_ping(now, config->addr, 0, loopback))
|
||||
else if ((!lease || lease->addr.s_addr != config->addr.s_addr) && !do_icmp_ping(now, config->addr, 0, loopback))
|
||||
my_syslog(MS_DHCP | LOG_WARNING, _("not using configured address %s because it is in use by another host"), addrs);
|
||||
else
|
||||
conf = config->addr;
|
||||
|
||||
Reference in new issue
Block a user