tools: cmake: fix librt linking (FS#1032)
[openwrt/openwrt.git] / package / network / services / dnsmasq / patches / 011-Remove-ping-check-of-configured-DHCP-address.patch
1 From 1d224949cced9e82440d00b3dbaf32c262bac2ff Mon Sep 17 00:00:00 2001
2 From: Simon Kelley <simon@thekelleys.org.uk>
3 Date: Sat, 8 Jul 2017 20:52:55 +0100
4 Subject: [PATCH 1/2] Remove ping-check of configured DHCP address.
5
6 This was added in 5ce3e76fbf89e942e8c54ef3e3389facf0d9067a but
7 it trips over too many buggy clients that leave an interface configured
8 even in DHCPDISCOVER case.
9 ---
10 src/rfc2131.c | 2 --
11 1 file changed, 2 deletions(-)
12
13 diff --git a/src/rfc2131.c b/src/rfc2131.c
14 index 86230b4..785e15c 100644
15 --- a/src/rfc2131.c
16 +++ b/src/rfc2131.c
17 @@ -1040,8 +1040,6 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
18 else if (have_config(config, CONFIG_DECLINED) &&
19 difftime(now, config->decline_time) < (float)DECLINE_BACKOFF)
20 my_syslog(MS_DHCP | LOG_WARNING, _("not using configured address %s because it was previously declined"), addrs);
21 - else if ((!lease || lease->addr.s_addr != config->addr.s_addr) && !do_icmp_ping(now, config->addr, 0, loopback))
22 - my_syslog(MS_DHCP | LOG_WARNING, _("not using configured address %s because it is in use by another host"), addrs);
23 else
24 conf = config->addr;
25 }
26 --
27 2.13.2
28