git: 8cb026d575ba - 2024Q4 - dns/dnsmasq: Fix --dhcp-relay not working on FreeBSD
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 08 Dec 2024 15:04:17 UTC
The branch 2024Q4 has been updated by mandree:
URL: https://cgit.FreeBSD.org/ports/commit/?id=8cb026d575baf5460c1770ec2e9ec085da5a953e
commit 8cb026d575baf5460c1770ec2e9ec085da5a953e
Author: Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2024-12-08 14:50:08 +0000
Commit: Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2024-12-08 15:02:57 +0000
dns/dnsmasq: Fix --dhcp-relay not working on FreeBSD
PR: 283138
MFH: 2024Q2
Reported by: Harald Schmalzbauer
Obtained from: Simon Kelley, https://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commitdiff;h=5a1f2c577db58ea47727f1b6900c0be25e6db205
(cherry picked from commit b572f527d6423f318197a98802cb58b8e20929d7)
---
dns/dnsmasq/Makefile | 3 +--
dns/dnsmasq/files/patch-CHANGELOG | 10 ++++++++++
dns/dnsmasq/files/patch-src_dhcp.c | 12 ++++++++++++
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/dns/dnsmasq/Makefile b/dns/dnsmasq/Makefile
index 522c420f55a5..e3726648b0ef 100644
--- a/dns/dnsmasq/Makefile
+++ b/dns/dnsmasq/Makefile
@@ -1,7 +1,7 @@
PORTNAME= dnsmasq
DISTVERSION= 2.90
# Leave the PORTREVISION in even if 0 to avoid accidental PORTEPOCH bumps:
-PORTREVISION= 2
+PORTREVISION= 3
PORTEPOCH= 1
CATEGORIES= dns
MASTER_SITES= https://www.thekelleys.org.uk/dnsmasq/ \
@@ -31,7 +31,6 @@ CPPFLAGS+= -I${LOCALBASE}/include
CONFLICTS_INSTALL= dnsmasq-devel
-PATCH_STRIP= -p1
SUB_FILES= pkg-message
PORTDOCS= CHANGELOG CHANGELOG.archive FAQ doc.html setup.html
diff --git a/dns/dnsmasq/files/patch-CHANGELOG b/dns/dnsmasq/files/patch-CHANGELOG
new file mode 100644
index 000000000000..3332566802fa
--- /dev/null
+++ b/dns/dnsmasq/files/patch-CHANGELOG
@@ -0,0 +1,10 @@
+--- CHANGELOG.orig 2024-02-13 13:49:15 UTC
++++ CHANGELOG
+@@ -1,3 +1,7 @@
++post version 2.90
++ Fix broken dhcp-relay on *BSD. Thanks to Harold for finding
++ this problem.
++
+ version 2.90
+ Fix reversion in --rev-server introduced in 2.88 which
+ caused breakage if the prefix length is not exactly divisible
diff --git a/dns/dnsmasq/files/patch-src_dhcp.c b/dns/dnsmasq/files/patch-src_dhcp.c
new file mode 100644
index 000000000000..24f31c859c3c
--- /dev/null
+++ b/dns/dnsmasq/files/patch-src_dhcp.c
@@ -0,0 +1,12 @@
+--- src/dhcp.c.orig 2024-02-13 13:49:15 UTC
++++ src/dhcp.c
+@@ -1121,6 +1121,9 @@ static int relay_upstream4(int iface_index, struct dhc
+ to.sa.sa_family = AF_INET;
+ to.in.sin_addr = relay->server.addr4;
+ to.in.sin_port = htons(relay->port);
++#ifdef HAVE_SOCKADDR_SA_LEN
++ to.in.sin_len = sizeof(struct sockaddr_in);
++#endif
+
+ /* Broadcasting to server. */
+ if (relay->server.addr4.s_addr == 0)