git: 6fc24efefedc - main - dns/dnsmasq-devel: update to 2.87test7

From: Matthias Andree <mandree_at_FreeBSD.org>
Date: Sun, 06 Feb 2022 11:25:58 UTC
The branch main has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=6fc24efefedcf3bb2d7fe3546d416402ea187eaf

commit 6fc24efefedcf3bb2d7fe3546d416402ea187eaf
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2022-02-06 11:19:59 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2022-02-06 11:23:10 +0000

    dns/dnsmasq-devel: update to 2.87test7
    
    with one patch by Johnny S. Lee via mailing list to
    avoid a build failure on *BSD.
---
 dns/dnsmasq-devel/Makefile           | 13 ++++++-------
 dns/dnsmasq-devel/distinfo           |  6 +++---
 dns/dnsmasq-devel/files/patch-dhcp.c | 22 ++++++++++++++++++++++
 3 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/dns/dnsmasq-devel/Makefile b/dns/dnsmasq-devel/Makefile
index 1c931e4b3090..12717b829706 100644
--- a/dns/dnsmasq-devel/Makefile
+++ b/dns/dnsmasq-devel/Makefile
@@ -1,26 +1,25 @@
 # Created by: Steven Honson
 
 PORTNAME=	dnsmasq
-DISTVERSION=	2.86rc3
+DISTVERSION=	2.87test7
 # Leave the PORTREVISION in even if 0 to avoid accidental PORTEPOCH bumps:
 PORTREVISION=	0
 PORTEPOCH=	4 # attn - different between -devel and dnsmasq ports!
 CATEGORIES=	dns
-MASTER_SITES=	https://www.thekelleys.org.uk/dnsmasq/release-candidates/ \
-		LOCAL/mandree/
-#MASTER_SITES=	https://www.thekelleys.org.uk/dnsmasq/test-releases/ \
+#MASTER_SITES=	https://www.thekelleys.org.uk/dnsmasq/release-candidates/ \
 #		LOCAL/mandree/
+MASTER_SITES=	https://www.thekelleys.org.uk/dnsmasq/test-releases/ \
+		LOCAL/mandree/
 PKGNAMESUFFIX=	-devel
 
 MAINTAINER=	mandree@FreeBSD.org
 COMMENT=	Lightweight DNS forwarder, DHCP, and TFTP server
 
-IGNORE=		please use dns/dnsmasq, which is newer
+#IGNORE=		please use dns/dnsmasq, which is newer # re-enable after 2.87 release
+DEPRECATED=	Short-lived test branch, to be removed after v2.87 release
 
 LICENSE=	GPLv2
 
-DEPRECATED=	Short-lived test branch, to be removed after v2.86 release
-
 USES=		cpe shebangfix tar:xz
 CPE_VENDOR=	thekelleys
 
diff --git a/dns/dnsmasq-devel/distinfo b/dns/dnsmasq-devel/distinfo
index 4f58a1e768cf..7c5921bc2557 100644
--- a/dns/dnsmasq-devel/distinfo
+++ b/dns/dnsmasq-devel/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1630614912
-SHA256 (dnsmasq-2.86rc3.tar.xz) = 78c25c55603bdf18d8e55d110f0b9d24a71b6c41a6ee518ee0627f30827fc4df
-SIZE (dnsmasq-2.86rc3.tar.xz) = 551944
+TIMESTAMP = 1644144495
+SHA256 (dnsmasq-2.87test7.tar.xz) = 784462a4fed72b2bcabe2a9fbf428519f10740546a88b4a91432379042320588
+SIZE (dnsmasq-2.87test7.tar.xz) = 558152
diff --git a/dns/dnsmasq-devel/files/patch-dhcp.c b/dns/dnsmasq-devel/files/patch-dhcp.c
new file mode 100644
index 000000000000..4ceeba72fb1d
--- /dev/null
+++ b/dns/dnsmasq-devel/files/patch-dhcp.c
@@ -0,0 +1,22 @@
+Taken from upstream git repository
+https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commitdiff;h=4333d5d93a8fb2c14ef3d9eefb1a13fb6ca8d9d5
+
+Author: Johnny S. Lee (via mailing list)
+
+--- ./src/dhcp.c.orig	2022-02-02 18:31:22 UTC
++++ ./src/dhcp.c
+@@ -458,9 +458,12 @@ void dhcp_packet(time_t now, int pxe_fd)
+   else 
+     {
+ #ifdef HAVE_DUMPFILE
+-      dest.sin_addr.s_addr = (ntohs(mess->flags) & 0x8000) ? INADDR_BROADCAST : mess->yiaddr;
++      if (ntohs(mess->flags) & 0x8000)
++        dest.sin_addr.s_addr = INADDR_BROADCAST;
++      else
++        dest.sin_addr = mess->yiaddr;
+       dest.sin_port = htons(daemon->dhcp_client_port);
+-
++      
+       dump_packet(DUMP_DHCP, (void *)iov.iov_base, iov.iov_len, NULL,
+ 		  (union mysockaddr *)&dest, daemon->dhcp_server_port);
+ #endif