aboutsummaryrefslogtreecommitdiff
path: root/dns/dnsmasq
diff options
context:
space:
mode:
authorMatthias Andree <mandree@FreeBSD.org>2017-06-07 20:00:41 +0000
committerMatthias Andree <mandree@FreeBSD.org>2017-06-07 20:00:41 +0000
commit6a565e29e5ee4423a5c5a96fb785a1c12dbc4d9c (patch)
treef524441198c58c2584cf780b81d768ab436e296e /dns/dnsmasq
parent6419342b279444322774001b938be63f00f5b70b (diff)
downloadports-6a565e29e5ee4423a5c5a96fb785a1c12dbc4d9c.tar.gz
ports-6a565e29e5ee4423a5c5a96fb785a1c12dbc4d9c.zip
Fix up pxelogic.0 suffix logic.
Regression in v2.77 caused by a patch proposed by yours truly. Reported by: Steven Shiau (via upstream dnsmasq-discuss mailing list) Obtained from: Chris Novakovich and Simon Kelley Pointyhat to: mandree@
Notes
Notes: svn path=/head/; revision=442888
Diffstat (limited to 'dns/dnsmasq')
-rw-r--r--dns/dnsmasq/Makefile2
-rw-r--r--dns/dnsmasq/files/patch-src_rfc2131.c30
2 files changed, 31 insertions, 1 deletions
diff --git a/dns/dnsmasq/Makefile b/dns/dnsmasq/Makefile
index 908dee564892..d67fc6eaee88 100644
--- a/dns/dnsmasq/Makefile
+++ b/dns/dnsmasq/Makefile
@@ -3,7 +3,7 @@
PORTNAME= dnsmasq
DISTVERSION= 2.77
-PORTREVISION= 0 # leave this in even if 0 to avoid PORTEPOCH bumps
+PORTREVISION= 1 # leave this in even if 0 to avoid PORTEPOCH bumps
PORTEPOCH= 1
CATEGORIES= dns ipv6
MASTER_SITES= http://www.thekelleys.org.uk/dnsmasq/ \
diff --git a/dns/dnsmasq/files/patch-src_rfc2131.c b/dns/dnsmasq/files/patch-src_rfc2131.c
new file mode 100644
index 000000000000..2e4ab8dea06d
--- /dev/null
+++ b/dns/dnsmasq/files/patch-src_rfc2131.c
@@ -0,0 +1,30 @@
+commit 2446514e716075cfe2be35e2a9b9de4eacdbac99
+Author: Chris Novakovic <chris@chrisn.me.uk>
+Date: Tue Jun 6 23:02:59 2017 +0100
+
+ Fix logic of appending ".<layer>" to PXE basename
+
+ Commit f77700aa, which fixes a compiler warning, also breaks the
+ behaviour of prepending ".<layer>" to basenames in --pxe-service: in
+ situations where the basename contains a ".", the ".<layer>" suffix is
+ erroneously added, and in situations where the basename doesn't contain
+ a ".", the ".<layer>" suffix is erroneously omitted.
+
+ A patch against the git HEAD is attached that inverts this logic and
+ restores the expected behaviour of --pxe-service.
+
+--- src/rfc2131.c.orig 2017-05-22 21:58:46 UTC
++++ src/rfc2131.c
+@@ -836,10 +836,10 @@ size_t dhcp_reply(struct dhcp_context *c
+
+ if (strchr(service->basename, '.'))
+ snprintf((char *)mess->file, sizeof(mess->file),
+- "%s.%d", service->basename, layer);
++ "%s", service->basename);
+ else
+ snprintf((char *)mess->file, sizeof(mess->file),
+- "%s", service->basename);
++ "%s.%d", service->basename, layer);
+
+ option_put(mess, end, OPTION_MESSAGE_TYPE, 1, DHCPACK);
+ option_put(mess, end, OPTION_SERVER_IDENTIFIER, INADDRSZ, htonl(context->local.s_addr));