From 93ac1e9332cb591fbe2830864fa0dc3c95966ad7 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Aug 05 2015 16:37:24 +0000 Subject: import dnsmasq-2.66-14.el7_1 --- diff --git a/SOURCES/dnsmasq-2.66-dhcp-v4-v6.patch b/SOURCES/dnsmasq-2.66-dhcp-v4-v6.patch new file mode 100644 index 0000000..d2436b3 --- /dev/null +++ b/SOURCES/dnsmasq-2.66-dhcp-v4-v6.patch @@ -0,0 +1,60 @@ +From 24b5a5d50bc793f7e218ef6018ad210eab28c686 Mon Sep 17 00:00:00 2001 +From: Simon Kelley +Date: Fri, 11 Oct 2013 15:19:28 +0100 +Subject: [PATCH 1/1] dhcp-host selection fix for v4/v6 + +--- + CHANGELOG | 5 +++++ + src/dhcp-common.c | 35 +++++++++++++++++------------------ + src/rfc1035.c | 14 +++++++------- + 3 files changed, 29 insertions(+), 25 deletions(-) + +diff --git a/src/dhcp-common.c b/src/dhcp-common.c +index 304c47e..5b0756d 100644 +--- a/src/dhcp-common.c ++++ b/src/dhcp-common.c +@@ -272,27 +272,26 @@ static int is_config_in_context(struct dhcp_context *context, struct dhcp_config + if (!context) /* called via find_config() from lease_update_from_configs() */ + return 1; + +- if (!(context->flags & CONTEXT_V6)) +- { +- if (!(config->flags & CONFIG_ADDR)) +- return 1; ++ if (!(config->flags & (CONFIG_ADDR | CONFIG_ADDR6))) ++ return 1; ++ ++#ifdef HAVE_DHCP6 ++ if ((context->flags & CONTEXT_V6) && (config->flags & CONFIG_WILDCARD)) ++ return 1; ++#endif + +- for (; context; context = context->current) +- if (is_same_net(config->addr, context->start, context->netmask)) +- return 1; +- } ++ for (; context; context = context->current) + #ifdef HAVE_DHCP6 +- else +- { +- if (!(config->flags & CONFIG_ADDR6) || (config->flags & CONFIG_WILDCARD)) +- return 1; +- +- for (; context; context = context->current) +- if (is_same_net6(&config->addr6, &context->start6, context->prefix)) +- return 1; +- } ++ if (context->flags & CONTEXT_V6) ++ { ++ if ((config->flags & CONFIG_ADDR6) && is_same_net6(&config->addr6, &context->start6, context->prefix)) ++ return 1; ++ } ++ else + #endif +- ++ if ((config->flags & CONFIG_ADDR) && is_same_net(config->addr, context->start, context->netmask)) ++ return 1; ++ + return 0; + } + diff --git a/SPECS/dnsmasq.spec b/SPECS/dnsmasq.spec index 5ab2b21..82b4b11 100644 --- a/SPECS/dnsmasq.spec +++ b/SPECS/dnsmasq.spec @@ -13,7 +13,7 @@ Name: dnsmasq Version: 2.66 -Release: 13%{?extraversion}%{?dist} +Release: 14%{?extraversion}%{?dist} Summary: A lightweight DHCP/caching DNS server Group: System Environment/Daemons @@ -65,6 +65,8 @@ Patch18: %{name}-2.66-Fix_crash_with_empty_DHCP_string_options.patch Patch19: %{name}-2.66-Set-SOREUSEADDR-as-well-as-SOREUSEPORT-on-DHCP-socke.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1179756 Patch20: %{name}-2.66-Support-IPv6-assignment-based-on-MAC-for-DHCPv6.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1232677 +Patch21: %{name}-2.66-dhcp-v4-v6.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -122,6 +124,7 @@ query/remove a DHCP server's leases. %patch18 -p1 -b .empty_dhcp_opts %patch19 -p1 -b .reuseport %patch20 -p1 +%patch21 -p1 # use /var/lib/dnsmasq instead of /var/lib/misc for file in dnsmasq.conf.example man/dnsmasq.8 man/es/dnsmasq.8 src/config.h; do @@ -202,6 +205,9 @@ rm -rf $RPM_BUILD_ROOT %{_mandir}/man1/dhcp_* %changelog +* Thu Jun 25 2015 Pavel Šimerda - 2.66-14 +- Resolves: #1232677 - handle IPv4 and IPv6 host entries properly + * Wed Feb 25 2015 Pavel Šimerda - 2.66-13 - Resolves: #1179756 - dnsmasq does not support MAC address based matching for IPv6