aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2017-06-26 10:23:08 +0200
committerHans Dedecker <dedeckeh@gmail.com>2017-06-26 10:49:13 +0200
commitf33de8023228d7d6545ff12c4f2ef8febb486f37 (patch)
treeec73840f12cc6897e5f42519bacb1d20ac95b4cf /package/network
parent2c5f16ecac58b0ea88afdccc6febe9d39f016a6e (diff)
downloadupstream-f33de8023228d7d6545ff12c4f2ef8febb486f37.tar.gz
upstream-f33de8023228d7d6545ff12c4f2ef8febb486f37.tar.bz2
upstream-f33de8023228d7d6545ff12c4f2ef8febb486f37.zip
dnsmasq: backport tweak ICMP ping logic for DHCPv4
Don't start ping-check of address in DHCP discover if there already exists a lease for the address. It has been reported under some circumstances android and netbooted windows devices can reply to ICMP pings if they have a lease and thus block the allocation of the IP address the device already has during boot. Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'package/network')
-rw-r--r--package/network/services/dnsmasq/Makefile2
-rw-r--r--package/network/services/dnsmasq/patches/010-Tweak-ICMP-ping-check-logic-for-DHCPv4.patch25
2 files changed, 26 insertions, 1 deletions
diff --git a/package/network/services/dnsmasq/Makefile b/package/network/services/dnsmasq/Makefile
index 35ac6b2891..11baff37e8 100644
--- a/package/network/services/dnsmasq/Makefile
+++ b/package/network/services/dnsmasq/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmasq
PKG_VERSION:=2.77
-PKG_RELEASE:=4
+PKG_RELEASE:=5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq/
diff --git a/package/network/services/dnsmasq/patches/010-Tweak-ICMP-ping-check-logic-for-DHCPv4.patch b/package/network/services/dnsmasq/patches/010-Tweak-ICMP-ping-check-logic-for-DHCPv4.patch
new file mode 100644
index 0000000000..571ff3683d
--- /dev/null
+++ b/package/network/services/dnsmasq/patches/010-Tweak-ICMP-ping-check-logic-for-DHCPv4.patch
@@ -0,0 +1,25 @@
+From 4bb68866a8aeb31db8100492bceae051e33be5d0 Mon Sep 17 00:00:00 2001
+From: Simon Kelley <simon@thekelleys.org.uk>
+Date: Thu, 15 Jun 2017 23:18:44 +0100
+Subject: [PATCH] Tweak ICMP ping check logic for DHCPv4.
+
+---
+ src/rfc2131.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/rfc2131.c b/src/rfc2131.c
+index 1c850e5..75792da 100644
+--- a/src/rfc2131.c
++++ b/src/rfc2131.c
+@@ -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;
+--
+1.9.1
+