[arch-commits] Commit in dnsmasq/trunk (2 files)

Christian Hesse eworm at archlinux.org
Sun Aug 27 19:43:41 UTC 2017


    Date: Sunday, August 27, 2017 @ 19:43:40
  Author: eworm
Revision: 304260

upgpkg: dnsmasq 2.77-4

Apply: Fix logic of appending ".<layer>" to PXE basename (FS#55302)

Added:
  dnsmasq/trunk/0002-Fix-logic-of-appending-layer-to-PXE-basename.patch
Modified:
  dnsmasq/trunk/PKGBUILD

---------------------------------------------------------+
 0002-Fix-logic-of-appending-layer-to-PXE-basename.patch |   35 ++++++++++++++
 PKGBUILD                                                |    5 +-
 2 files changed, 39 insertions(+), 1 deletion(-)

Added: 0002-Fix-logic-of-appending-layer-to-PXE-basename.patch
===================================================================
--- 0002-Fix-logic-of-appending-layer-to-PXE-basename.patch	                        (rev 0)
+++ 0002-Fix-logic-of-appending-layer-to-PXE-basename.patch	2017-08-27 19:43:40 UTC (rev 304260)
@@ -0,0 +1,35 @@
+From: Chris Novakovic <chris at chrisn.me.uk>
+Date: Tue, 6 Jun 2017 22:02:59 +0000 (+0100)
+Subject: Fix logic of appending ".<layer>" to PXE basename
+X-Git-Tag: v2.78test1~1
+X-Git-Url: http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commitdiff_plain;h=2446514e716075cfe2be35e2a9b9de4eacdbac99
+
+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.
+---
+
+diff --git a/src/rfc2131.c b/src/rfc2131.c
+index a679470..1c850e5 100644
+--- a/src/rfc2131.c
++++ b/src/rfc2131.c
+@@ -836,10 +836,10 @@ size_t dhcp_reply(struct dhcp_context *context, char *iface_name, int int_index,
+ 	  
+ 	  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));

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2017-08-27 13:36:37 UTC (rev 304259)
+++ PKGBUILD	2017-08-27 19:43:40 UTC (rev 304260)
@@ -6,7 +6,7 @@
 
 pkgname=dnsmasq
 pkgver=2.77
-pkgrel=3
+pkgrel=4
 pkgdesc="Lightweight, easy to configure DNS forwarder and DHCP server"
 url="http://www.thekelleys.org.uk/dnsmasq/doc.html"
 arch=('i686' 'x86_64')
@@ -16,11 +16,13 @@
 validpgpkeys=('D6EACBD6EE46B834248D111215CDDA6AE19135A2') # Simon Kelley <simon at thekelleys.org.uk>
 source=("http://www.thekelleys.org.uk/$pkgname/$pkgname-$pkgver.tar.xz"{,.asc}
         '0001-do-not-include-stdio-h-before-dnsmasq-h.patch'
+        '0002-Fix-logic-of-appending-layer-to-PXE-basename.patch'
         'dnsmasq-sysusers.conf'
         'dnsmasq.service')
 sha256sums=('6eac3b1c50ae25170e3ff8c96ddb55236cf45007633fdb8a35b1f3e02f5f8b8a'
             'SKIP'
             'bd39af88222ec44d269734d0513656bed865fb0f0901b538fdbbe19768e91bcf'
+            '5c969e79037980f3d138434a40c4478f7383f9ee9a46689c96dcf93f74062e11'
             '7f6ff6a709038ae580758f4b6a754451d7f7ce22957b88a36b97f7b643d3c2ab'
             '983a3c7a68ce114cf7b44f0d9c59b74c266647a9e5ac34c1d1d5161610bc57fe')
 
@@ -30,6 +32,7 @@
   cd "$pkgname-$pkgver"
 
   patch -Np1 < "${srcdir}"/0001-do-not-include-stdio-h-before-dnsmasq-h.patch
+  patch -Np1 < "${srcdir}"/0002-Fix-logic-of-appending-layer-to-PXE-basename.patch
 }
 
 build() {



More information about the arch-commits mailing list