Gentoo Archives: gentoo-commits

From: Patrick McLean <chutzpah@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsmasq/files/, net-dns/dnsmasq/
Date: Tue, 31 May 2016 22:19:50
Message-Id: 1464733177.82c65b45c21f0c64aaf06ced2177d58685caf9ac.chutzpah@gentoo
1 commit: 82c65b45c21f0c64aaf06ced2177d58685caf9ac
2 Author: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 31 22:19:27 2016 +0000
4 Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org>
5 CommitDate: Tue May 31 22:19:37 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82c65b45
7
8 net-dns/dnsmasq: Clean out old versions
9
10 Package-Manager: portage-2.3.0_rc1
11
12 net-dns/dnsmasq/Manifest | 2 -
13 net-dns/dnsmasq/dnsmasq-2.66.ebuild | 139 ---------------
14 net-dns/dnsmasq/dnsmasq-2.72-r2.ebuild | 192 ---------------------
15 .../dnsmasq/files/dnsmasq-2.47-fbsd-config.patch | 16 --
16 .../files/dnsmasq-2.66-dhcp-option-zero.patch | 134 --------------
17 ...up-servers.bind-when-many-servers-defined.patch | 28 ---
18 ...receipt-of-certain-malformed-DNS-requests.patch | 40 -----
19 net-dns/dnsmasq/files/dnsmasq.service | 12 --
20 8 files changed, 563 deletions(-)
21
22 diff --git a/net-dns/dnsmasq/Manifest b/net-dns/dnsmasq/Manifest
23 index 3c7db91..2eea2d5 100644
24 --- a/net-dns/dnsmasq/Manifest
25 +++ b/net-dns/dnsmasq/Manifest
26 @@ -1,4 +1,2 @@
27 -DIST dnsmasq-2.66.tar.xz 401056 SHA256 5e143947527bcdc46a30f4b1bbdfbfa96333dd98bcecdac3b5b1d6cacfe06c75 SHA512 f0bde09f178ca15f4c28efb06901213af9a009b4476daa8a08bafc7682b9ffed13ac65c5c232acdf828382f321137de08b4a33108d22613b198fe30695b3362c WHIRLPOOL e749d24017c35fdbaaaf417decdf9316e235cf7f96f031caceee14d06b982c285b0e561f50597cd12b6a31ef554f7f2e22ca6234f44a6d8bb066dede99461166
28 -DIST dnsmasq-2.72.tar.xz 454048 SHA256 7d0bd23f5d74b3a6b26a75d5ffcf9db81d461b47cbe578cb65a83a98008600b1 SHA512 d84b89c987966a5f5880aa329833626b0a017628dd6aa667bdad880d1c5f101a386dddb439eb6983d58952a36f25670bf58df94281b89320f02895a3e6af4cec WHIRLPOOL 491eadb0060f372a0b7f5855fb57040c4baf37352732a2943fb4173aa28e875b91537f87085201f13e76ec5680e4ad681992829a5cef800833be0911298a793c
29 DIST dnsmasq-2.75.tar.xz 472484 SHA256 640c4e1d4c298e42458419cd78cfc26acc549401b1a34d271cd3e0e4226941f1 SHA512 dc6f64e8f04179bba4ceea5acbda4da27398e3e7a87f07ed645c383b0cccef416c438a859decff7be25849e28db9e53912693cdbf7f01ddd9bbf1d5e6ae2a8ec WHIRLPOOL ff2d0c2cb51cae6f2db09321c116003cdc512940001a839424a6ba1ba47deadfe412d01a0e68285250f7dbd9bef454c99e302805defc91783f703863c344b182
30 DIST dnsmasq-2.76.tar.xz 480796 SHA256 4b92698dee19ca0cb2a8f2e48f1d2dffd01a21eb15d1fbed4cf085630c8c9f96 SHA512 8a930f3e7cdc0c291ce89bea8128a4b8438b9aa9e660a2ac037e0baa4c5c74f4482a8f83b0410066a759444b3c4e1cf62a9beb625e38509690227996de10e06a WHIRLPOOL e0710f879fd6f8e27581b8c400704660941601cd2077f32d7c2b3f9791c6be8404469770e74f7e1a03880507a32a30c19b89f6a953a757ad01305f829448f0bc
31
32 diff --git a/net-dns/dnsmasq/dnsmasq-2.66.ebuild b/net-dns/dnsmasq/dnsmasq-2.66.ebuild
33 deleted file mode 100644
34 index a5dfba9..0000000
35 --- a/net-dns/dnsmasq/dnsmasq-2.66.ebuild
36 +++ /dev/null
37 @@ -1,139 +0,0 @@
38 -# Copyright 1999-2015 Gentoo Foundation
39 -# Distributed under the terms of the GNU General Public License v2
40 -# $Id$
41 -
42 -EAPI=5
43 -
44 -inherit eutils toolchain-funcs flag-o-matic user systemd
45 -
46 -DESCRIPTION="Small forwarding DNS server"
47 -HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/"
48 -SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
49 -
50 -LICENSE="|| ( GPL-2 GPL-3 )"
51 -SLOT="0"
52 -KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~sparc-fbsd ~x86-fbsd"
53 -IUSE="auth-dns conntrack dbus +dhcp dhcp-tools idn ipv6 lua nls script selinux tftp"
54 -DM_LINGUAS="de es fi fr id it no pl pt_BR ro"
55 -for dm_lingua in ${DM_LINGUAS}; do
56 - IUSE+=" linguas_${dm_lingua}"
57 -done
58 -
59 -CDEPEND="dbus? ( sys-apps/dbus )
60 - idn? ( net-dns/libidn )
61 - lua? ( dev-lang/lua )
62 - conntrack? ( !s390? ( net-libs/libnetfilter_conntrack ) )
63 - nls? (
64 - sys-devel/gettext
65 - net-dns/libidn
66 - )"
67 -
68 -DEPEND="${CDEPEND}
69 - virtual/pkgconfig
70 - app-arch/xz-utils"
71 -
72 -RDEPEND="${CDEPEND}
73 - selinux? ( sec-policy/selinux-dnsmasq )"
74 -
75 -REQUIRED_USE="dhcp-tools? ( dhcp )
76 - lua? ( script )
77 - s390? ( !conntrack )"
78 -
79 -use_have() {
80 - local NO_ONLY=""
81 - if [ $1 == '-n' ]; then
82 - NO_ONLY=1
83 - shift
84 - fi
85 -
86 - local UWORD=${2:-$1}
87 - # Switch to ^^ when we switch to EAPI=6.
88 - #UWORD=${UWORD^^}
89 - UWORD=$(tr '[:lower:]' '[:upper:]' <<<"${UWORD}")
90 -
91 - if ! use ${1}; then
92 - echo " -DNO_${UWORD}"
93 - elif [ -z "${NO_ONLY}" ]; then
94 - echo " -DHAVE_${UWORD}"
95 - fi
96 -}
97 -
98 -pkg_setup() {
99 - enewgroup dnsmasq
100 - enewuser dnsmasq -1 -1 /dev/null dnsmasq
101 -}
102 -
103 -src_prepare() {
104 - # dnsmasq on FreeBSD wants the config file in a silly location, this fixes
105 - epatch "${FILESDIR}/${P}-dhcp-option-zero.patch"
106 - sed -i -r 's:lua5.[0-9]+:lua:' Makefile
107 -}
108 -
109 -src_configure() {
110 - COPTS="$(use_have -n auth-dns auth)"
111 - COPTS+="$(use_have conntrack)"
112 - COPTS+="$(use_have dbus)"
113 - COPTS+="$(use_have -n dhcp)"
114 - COPTS+="$(use_have idn)"
115 - COPTS+="$(use_have -n ipv6)"
116 - COPTS+="$(use_have lua luascript)"
117 - COPTS+="$(use_have -n script)"
118 - COPTS+="$(use_have -n tftp)"
119 - COPTS+="$(use ipv6 && use dhcp || echo " -DNO_DHCP6")"
120 -}
121 -
122 -src_compile() {
123 - emake \
124 - PREFIX=/usr \
125 - CC="$(tc-getCC)" \
126 - CFLAGS="${CFLAGS}" \
127 - LDFLAGS="${LDFLAGS}" \
128 - COPTS="${COPTS}" \
129 - CONFFILE="/etc/${PN}.conf" \
130 - all$(use nls && echo "-i18n")
131 -
132 - use dhcp-tools && emake -C contrib/wrt \
133 - PREFIX=/usr \
134 - CC="$(tc-getCC)" \
135 - CFLAGS="${CFLAGS}" \
136 - LDFLAGS="${LDFLAGS}" \
137 - all
138 -}
139 -
140 -src_install() {
141 - emake \
142 - PREFIX=/usr \
143 - MANDIR=/usr/share/man \
144 - DESTDIR="${D}" \
145 - install$(use nls && echo "-i18n")
146 -
147 - local lingua
148 - for lingua in ${DM_LINGUAS}; do
149 - use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua}
150 - done
151 - rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/
152 -
153 - dodoc CHANGELOG CHANGELOG.archive FAQ
154 - dodoc -r logo
155 -
156 - dodoc CHANGELOG FAQ
157 - dohtml *.html
158 -
159 - newinitd "${FILESDIR}"/dnsmasq-init-r2 dnsmasq
160 - newconfd "${FILESDIR}"/dnsmasq.confd-r1 dnsmasq
161 -
162 - insinto /etc
163 - newins dnsmasq.conf.example dnsmasq.conf
164 -
165 - if use dbus; then
166 - insinto /etc/dbus-1/system.d
167 - doins dbus/dnsmasq.conf
168 - fi
169 -
170 - if use dhcp-tools; then
171 - dosbin contrib/wrt/{dhcp_release,dhcp_lease_time}
172 - doman contrib/wrt/{dhcp_release,dhcp_lease_time}.1
173 - fi
174 -
175 - systemd_dounit "${FILESDIR}"/dnsmasq.service
176 -}
177
178 diff --git a/net-dns/dnsmasq/dnsmasq-2.72-r2.ebuild b/net-dns/dnsmasq/dnsmasq-2.72-r2.ebuild
179 deleted file mode 100644
180 index b119b06..0000000
181 --- a/net-dns/dnsmasq/dnsmasq-2.72-r2.ebuild
182 +++ /dev/null
183 @@ -1,192 +0,0 @@
184 -# Copyright 1999-2015 Gentoo Foundation
185 -# Distributed under the terms of the GNU General Public License v2
186 -# $Id$
187 -
188 -EAPI=5
189 -
190 -inherit eutils toolchain-funcs flag-o-matic user systemd
191 -
192 -DESCRIPTION="Small forwarding DNS server"
193 -HOMEPAGE="http://www.thekelleys.org.uk/dnsmasq/doc.html"
194 -SRC_URI="http://www.thekelleys.org.uk/dnsmasq/${P}.tar.xz"
195 -
196 -LICENSE="|| ( GPL-2 GPL-3 )"
197 -SLOT="0"
198 -KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd"
199 -IUSE="auth-dns conntrack dbus +dhcp dhcp-tools dnssec idn ipv6 lua nls script selinux static tftp"
200 -DM_LINGUAS="de es fi fr id it no pl pt_BR ro"
201 -for dm_lingua in ${DM_LINGUAS}; do
202 - IUSE+=" linguas_${dm_lingua}"
203 -done
204 -
205 -CDEPEND="dbus? ( sys-apps/dbus )
206 - idn? ( net-dns/libidn )
207 - lua? (
208 - || (
209 - dev-lang/lua:0
210 - dev-lang/lua:5.1
211 - )
212 - )
213 - conntrack? ( net-libs/libnetfilter_conntrack )
214 - nls? (
215 - sys-devel/gettext
216 - net-dns/libidn
217 - )
218 -"
219 -
220 -DEPEND="${CDEPEND}
221 - app-arch/xz-utils
222 - dnssec? (
223 - dev-libs/nettle[gmp]
224 - static? (
225 - dev-libs/nettle[static-libs(+)]
226 - )
227 - )
228 - virtual/pkgconfig"
229 -
230 -RDEPEND="${CDEPEND}
231 - dnssec? (
232 - !static? (
233 - dev-libs/nettle[gmp]
234 - )
235 - )
236 - selinux? ( sec-policy/selinux-dnsmasq )
237 -"
238 -
239 -REQUIRED_USE="dhcp-tools? ( dhcp )
240 - lua? ( script )"
241 -
242 -use_have() {
243 - local useflag no_only uword
244 - if [[ $1 == '-n' ]]; then
245 - no_only=1
246 - shift
247 - fi
248 - useflag="${1}"
249 - shift
250 -
251 - uword="${1:-${useflag}}"
252 - shift
253 -
254 - while [[ ${uword} ]]; do
255 - # Switch to ^^ when we switch to EAPI=6.
256 - #uword=${uword^^}
257 - uword=$(tr '[:lower:]' '[:upper:]' <<<"${uword}")
258 -
259 - if ! use "${useflag}"; then
260 - echo -n " -DNO_${uword}"
261 - elif [[ -z "${no_only}" ]]; then
262 - echo -n " -DHAVE_${uword}"
263 - fi
264 - uword="${1}"
265 - shift
266 - done
267 -}
268 -
269 -pkg_pretend() {
270 - if use static; then
271 - einfo "Only sys-libs/gmp and dev-libs/nettle are statically linked."
272 - use dnssec || einfo "Thus, ${P}[!dnssec,static] makes no sense; the static USE flag is ignored."
273 - fi
274 -}
275 -
276 -pkg_setup() {
277 - enewgroup dnsmasq
278 - enewuser dnsmasq -1 -1 /dev/null dnsmasq
279 -}
280 -
281 -src_prepare() {
282 - sed -i -r 's:lua5.[0-9]+:lua:' Makefile
283 - sed -i "s:%%PREFIX%%:${EPREFIX}/usr:" dnsmasq.conf.example
284 -
285 - epatch "${FILESDIR}"/${P}-Fix-crash-on-receipt-of-certain-malformed-DNS-requests.patch
286 - epatch "${FILESDIR}"/${P}-Fix-crash-caused-by-looking-up-servers.bind-when-many-servers-defined.patch
287 -}
288 -
289 -src_configure() {
290 - COPTS="$(use_have -n auth-dns auth)"
291 - COPTS+="$(use_have conntrack)"
292 - COPTS+="$(use_have dbus)"
293 - COPTS+="$(use_have idn)"
294 - COPTS+="$(use_have -n dhcp dhcp dhcp6)"
295 - COPTS+="$(use_have -n ipv6 ipv6 dhcp6)"
296 - COPTS+="$(use_have lua luascript)"
297 - COPTS+="$(use_have -n script)"
298 - COPTS+="$(use_have -n tftp)"
299 - COPTS+="$(use_have dnssec)"
300 - COPTS+="$(use_have static dnssec_static)"
301 -}
302 -
303 -src_compile() {
304 - emake \
305 - PREFIX=/usr \
306 - CC="$(tc-getCC)" \
307 - CFLAGS="${CFLAGS}" \
308 - LDFLAGS="${LDFLAGS}" \
309 - COPTS="${COPTS}" \
310 - CONFFILE="/etc/${PN}.conf" \
311 - all$(use nls && echo "-i18n")
312 -
313 - use dhcp-tools && emake -C contrib/wrt \
314 - PREFIX=/usr \
315 - CC="$(tc-getCC)" \
316 - CFLAGS="${CFLAGS}" \
317 - LDFLAGS="${LDFLAGS}" \
318 - all
319 -}
320 -
321 -src_install() {
322 - local lingua puid
323 - emake \
324 - PREFIX=/usr \
325 - MANDIR=/usr/share/man \
326 - DESTDIR="${D}" \
327 - install$(use nls && echo "-i18n")
328 -
329 - for lingua in ${DM_LINGUAS}; do
330 - use linguas_${lingua} || rm -rf "${D}"/usr/share/locale/${lingua}
331 - done
332 - [[ -d "${D}"/usr/share/locale/ ]] && rmdir --ignore-fail-on-non-empty "${D}"/usr/share/locale/
333 -
334 - dodoc CHANGELOG CHANGELOG.archive FAQ dnsmasq.conf.example
335 - dodoc -r logo
336 -
337 - dodoc CHANGELOG FAQ
338 - dohtml *.html
339 -
340 - newinitd "${FILESDIR}"/dnsmasq-init-r2 ${PN}
341 - newconfd "${FILESDIR}"/dnsmasq.confd-r1 ${PN}
342 -
343 - insinto /etc
344 - newins dnsmasq.conf.example dnsmasq.conf
345 -
346 - insinto /usr/share/dnsmasq
347 - doins trust-anchors.conf
348 -
349 - if use dhcp; then
350 - dodir /var/lib/misc
351 - newinitd "${FILESDIR}"/dnsmasq-init-dhcp-r1 ${PN}
352 - fi
353 - if use dbus; then
354 - insinto /etc/dbus-1/system.d
355 - doins dbus/dnsmasq.conf
356 - fi
357 -
358 - if use dhcp-tools; then
359 - dosbin contrib/wrt/{dhcp_release,dhcp_lease_time}
360 - doman contrib/wrt/{dhcp_release,dhcp_lease_time}.1
361 - fi
362 -
363 - systemd_newunit "${FILESDIR}"/${PN}.service-r1 ${PN}.service
364 -
365 -}
366 -
367 -pkg_preinst() {
368 - # temporary workaround to (hopefully) prevent leases file from being removed
369 - [[ -f /var/lib/misc/dnsmasq.leases ]] && cp /var/lib/misc/dnsmasq.leases "${T}"
370 -}
371 -
372 -pkg_postinst() {
373 - # temporary workaround to (hopefully) prevent leases file from being removed
374 - [[ -f "${T}"/dnsmasq.leases ]] && cp "${T}"/dnsmasq.leases /var/lib/misc/dnsmasq.leases
375 -}
376
377 diff --git a/net-dns/dnsmasq/files/dnsmasq-2.47-fbsd-config.patch b/net-dns/dnsmasq/files/dnsmasq-2.47-fbsd-config.patch
378 deleted file mode 100644
379 index 38a3679..0000000
380 --- a/net-dns/dnsmasq/files/dnsmasq-2.47-fbsd-config.patch
381 +++ /dev/null
382 @@ -1,16 +0,0 @@
383 -diff -ur dnsmasq-2.47.orig/src/config.h dnsmasq-2.47/src/config.h
384 ---- dnsmasq-2.47.orig/src/config.h 2009-02-05 07:14:24.000000000 -0500
385 -+++ dnsmasq-2.47/src/config.h 2009-03-30 00:04:52.000000000 -0400
386 -@@ -50,11 +50,7 @@
387 - #endif
388 -
389 - #ifndef CONFFILE
390 --# if defined(__FreeBSD__)
391 --# define CONFFILE "/usr/local/etc/dnsmasq.conf"
392 --# else
393 --# define CONFFILE "/etc/dnsmasq.conf"
394 --# endif
395 -+# define CONFFILE "/etc/dnsmasq.conf"
396 - #endif
397 -
398 - #define DEFLEASE 3600 /* default lease time, 1 hour */
399
400 diff --git a/net-dns/dnsmasq/files/dnsmasq-2.66-dhcp-option-zero.patch b/net-dns/dnsmasq/files/dnsmasq-2.66-dhcp-option-zero.patch
401 deleted file mode 100644
402 index 6c52a53..0000000
403 --- a/net-dns/dnsmasq/files/dnsmasq-2.66-dhcp-option-zero.patch
404 +++ /dev/null
405 @@ -1,134 +0,0 @@
406 -commit bd08ae67f9a0cae2ce15be885254cad9449d4551
407 -Author: Simon Kelley <simon@××××××××××××××.uk>
408 -Date: Fri Apr 19 10:22:06 2013 +0100
409 -
410 - Allow option number zero in encapsulated DHCP options.
411 -
412 -diff --git a/src/dhcp-common.c b/src/dhcp-common.c
413 -index f4fd088..8de4268 100644
414 ---- a/src/dhcp-common.c
415 -+++ b/src/dhcp-common.c
416 -@@ -512,7 +512,7 @@ void display_opts6(void)
417 - }
418 - #endif
419 -
420 --u16 lookup_dhcp_opt(int prot, char *name)
421 -+int lookup_dhcp_opt(int prot, char *name)
422 - {
423 - const struct opttab_t *t;
424 - int i;
425 -@@ -528,10 +528,10 @@ u16 lookup_dhcp_opt(int prot, char *name)
426 - if (strcasecmp(t[i].name, name) == 0)
427 - return t[i].val;
428 -
429 -- return 0;
430 -+ return -1;
431 - }
432 -
433 --u16 lookup_dhcp_len(int prot, u16 val)
434 -+int lookup_dhcp_len(int prot, int val)
435 - {
436 - const struct opttab_t *t;
437 - int i;
438 -diff --git a/src/dnsmasq.h b/src/dnsmasq.h
439 -index 69ae7a7..41e2798 100644
440 ---- a/src/dnsmasq.h
441 -+++ b/src/dnsmasq.h
442 -@@ -1216,8 +1216,8 @@ void log_tags(struct dhcp_netid *netid, u32 xid);
443 - int match_bytes(struct dhcp_opt *o, unsigned char *p, int len);
444 - void dhcp_update_configs(struct dhcp_config *configs);
445 - void display_opts(void);
446 --u16 lookup_dhcp_opt(int prot, char *name);
447 --u16 lookup_dhcp_len(int prot, u16 val);
448 -+int lookup_dhcp_opt(int prot, char *name);
449 -+int lookup_dhcp_len(int prot, int val);
450 - char *option_string(int prot, unsigned int opt, unsigned char *val,
451 - int opt_len, char *buf, int buf_len);
452 - #ifdef HAVE_LINUX_NETWORK
453 -diff --git a/src/option.c b/src/option.c
454 -index b2596ec..2a61017 100644
455 ---- a/src/option.c
456 -+++ b/src/option.c
457 -@@ -750,6 +750,7 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags)
458 - struct dhcp_netid *np = NULL;
459 - u16 opt_len = 0;
460 - int is6 = 0;
461 -+ int option_ok = 0;
462 -
463 - new->len = 0;
464 - new->flags = flags;
465 -@@ -769,16 +770,19 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags)
466 - {
467 - new->opt = atoi(arg);
468 - opt_len = 0;
469 -+ option_ok = 1;
470 - break;
471 - }
472 -
473 - if (strstr(arg, "option:") == arg)
474 - {
475 -- new->opt = lookup_dhcp_opt(AF_INET, arg+7);
476 -- opt_len = lookup_dhcp_len(AF_INET, new->opt);
477 -- /* option:<optname> must follow tag and vendor string. */
478 -- if ((opt_len & OT_INTERNAL) && flags != DHOPT_MATCH)
479 -- new->opt = 0;
480 -+ if ((new->opt = lookup_dhcp_opt(AF_INET, arg+7)) != -1)
481 -+ {
482 -+ opt_len = lookup_dhcp_len(AF_INET, new->opt);
483 -+ /* option:<optname> must follow tag and vendor string. */
484 -+ if (!(opt_len & OT_INTERNAL) || flags == DHOPT_MATCH)
485 -+ option_ok = 1;
486 -+ }
487 - break;
488 - }
489 - #ifdef HAVE_DHCP6
490 -@@ -792,13 +796,16 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags)
491 - {
492 - new->opt = atoi(arg+8);
493 - opt_len = 0;
494 -+ option_ok = 1;
495 - }
496 - else
497 - {
498 -- new->opt = lookup_dhcp_opt(AF_INET6, arg+8);
499 -- opt_len = lookup_dhcp_len(AF_INET6, new->opt);
500 -- if ((opt_len & OT_INTERNAL) && flags != DHOPT_MATCH)
501 -- new->opt = 0;
502 -+ if ((new->opt = lookup_dhcp_opt(AF_INET6, arg+8)) != -1)
503 -+ {
504 -+ opt_len = lookup_dhcp_len(AF_INET6, new->opt);
505 -+ if (!(opt_len & OT_INTERNAL) || flags == DHOPT_MATCH)
506 -+ option_ok = 1;
507 -+ }
508 - }
509 - /* option6:<opt>|<optname> must follow tag and vendor string. */
510 - is6 = 1;
511 -@@ -821,7 +828,7 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags)
512 - new->flags |= DHOPT_RFC3925;
513 - if (flags == DHOPT_MATCH)
514 - {
515 -- new->opt = 1; /* avoid error below */
516 -+ option_ok = 1;
517 - break;
518 - }
519 - }
520 -@@ -848,16 +855,16 @@ static int parse_dhcp_opt(char *errstr, char *arg, int flags)
521 -
522 - if (opt_len == 0 &&
523 - !(new->flags & DHOPT_RFC3925))
524 -- opt_len = lookup_dhcp_len(AF_INET6 ,new->opt);
525 -+ opt_len = lookup_dhcp_len(AF_INET6, new->opt);
526 - }
527 - else
528 - #endif
529 - if (opt_len == 0 &&
530 - !(new->flags & (DHOPT_VENDOR | DHOPT_ENCAPSULATE | DHOPT_RFC3925)))
531 -- opt_len = lookup_dhcp_len(AF_INET ,new->opt);
532 -+ opt_len = lookup_dhcp_len(AF_INET, new->opt);
533 -
534 - /* option may be missing with rfc3925 match */
535 -- if (new->opt == 0)
536 -+ if (!option_ok)
537 - ret_err(_("bad dhcp-option"));
538 -
539 - if (comma)
540
541 diff --git a/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-caused-by-looking-up-servers.bind-when-many-servers-defined.patch b/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-caused-by-looking-up-servers.bind-when-many-servers-defined.patch
542 deleted file mode 100644
543 index 57708b6..0000000
544 --- a/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-caused-by-looking-up-servers.bind-when-many-servers-defined.patch
545 +++ /dev/null
546 @@ -1,28 +0,0 @@
547 -commit 04b0ac05377936d121a36873bb63d492cde292c9
548 -Author: Simon Kelley <simon@××××××××××××××.uk>
549 -Date: Mon Apr 6 17:19:13 2015 +0100
550 -
551 - Fix crash caused by looking up servers.bind when many servers defined.
552 -
553 -diff --git a/src/cache.c b/src/cache.c
554 -index d7bea57..178d654 100644
555 ---- a/src/cache.c
556 -+++ b/src/cache.c
557 -@@ -1367,7 +1367,7 @@ int cache_make_stat(struct txt_record *t)
558 - }
559 - port = prettyprint_addr(&serv->addr, daemon->addrbuff);
560 - lenp = p++; /* length */
561 -- bytes_avail = (p - buff) + bufflen;
562 -+ bytes_avail = bufflen - (p - buff );
563 - bytes_needed = snprintf(p, bytes_avail, "%s#%d %u %u", daemon->addrbuff, port, queries, failed_queries);
564 - if (bytes_needed >= bytes_avail)
565 - {
566 -@@ -1381,7 +1381,7 @@ int cache_make_stat(struct txt_record *t)
567 - lenp = p - 1;
568 - buff = new;
569 - bufflen = newlen;
570 -- bytes_avail = (p - buff) + bufflen;
571 -+ bytes_avail = bufflen - (p - buff );
572 - bytes_needed = snprintf(p, bytes_avail, "%s#%d %u %u", daemon->addrbuff, port, queries, failed_queries);
573 - }
574 - *lenp = bytes_needed;
575
576 diff --git a/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-on-receipt-of-certain-malformed-DNS-requests.patch b/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-on-receipt-of-certain-malformed-DNS-requests.patch
577 deleted file mode 100644
578 index c6106db..0000000
579 --- a/net-dns/dnsmasq/files/dnsmasq-2.72-Fix-crash-on-receipt-of-certain-malformed-DNS-requests.patch
580 +++ /dev/null
581 @@ -1,40 +0,0 @@
582 -commit ad4a8ff7d9097008d7623df8543df435bfddeac8
583 -Author: Simon Kelley <simon@××××××××××××××.uk>
584 -Date: Thu Apr 9 21:48:00 2015 +0100
585 -
586 - Fix crash on receipt of certain malformed DNS requests.
587 -
588 -diff --git a/src/rfc1035.c b/src/rfc1035.c
589 -index 7a07b0c..a995ab5 100644
590 ---- a/src/rfc1035.c
591 -+++ b/src/rfc1035.c
592 -@@ -1198,7 +1198,10 @@ unsigned int extract_request(struct dns_header *header, size_t qlen, char *name,
593 - size_t setup_reply(struct dns_header *header, size_t qlen,
594 - struct all_addr *addrp, unsigned int flags, unsigned long ttl)
595 - {
596 -- unsigned char *p = skip_questions(header, qlen);
597 -+ unsigned char *p;
598 -+
599 -+ if (!(p = skip_questions(header, qlen)))
600 -+ return 0;
601 -
602 - /* clear authoritative and truncated flags, set QR flag */
603 - header->hb3 = (header->hb3 & ~(HB3_AA | HB3_TC)) | HB3_QR;
604 -@@ -1214,7 +1217,7 @@ size_t setup_reply(struct dns_header *header, size_t qlen,
605 - SET_RCODE(header, NOERROR); /* empty domain */
606 - else if (flags == F_NXDOMAIN)
607 - SET_RCODE(header, NXDOMAIN);
608 -- else if (p && flags == F_IPV4)
609 -+ else if (flags == F_IPV4)
610 - { /* we know the address */
611 - SET_RCODE(header, NOERROR);
612 - header->ancount = htons(1);
613 -@@ -1222,7 +1225,7 @@ size_t setup_reply(struct dns_header *header, size_t qlen,
614 - add_resource_record(header, NULL, NULL, sizeof(struct dns_header), &p, ttl, NULL, T_A, C_IN, "4", addrp);
615 - }
616 - #ifdef HAVE_IPV6
617 -- else if (p && flags == F_IPV6)
618 -+ else if (flags == F_IPV6)
619 - {
620 - SET_RCODE(header, NOERROR);
621 - header->ancount = htons(1);
622
623 diff --git a/net-dns/dnsmasq/files/dnsmasq.service b/net-dns/dnsmasq/files/dnsmasq.service
624 deleted file mode 100644
625 index 8e313bc..0000000
626 --- a/net-dns/dnsmasq/files/dnsmasq.service
627 +++ /dev/null
628 @@ -1,12 +0,0 @@
629 -[Unit]
630 -Description=A lightweight DHCP and caching DNS server
631 -After=network.target
632 -
633 -[Service]
634 -Type=simple
635 -ExecStartPre=/usr/sbin/dnsmasq --test
636 -ExecStart=/usr/sbin/dnsmasq -k --user=dnsmasq --group=dnsmasq
637 -ExecReload=/bin/kill -HUP $MAINPID
638 -
639 -[Install]
640 -WantedBy=multi-user.target