[arch-commits] Commit in dhcpcd/trunk (39512.patch PKGBUILD)
Ronald van Haren
ronald at nymeria.archlinux.org
Tue Jun 3 19:41:57 UTC 2014
Date: Tuesday, June 3, 2014 @ 21:41:56
Author: ronald
Revision: 214107
upgpkg: dhcpcd 6.3.2-2
upstream fix for FS#39512
Added:
dhcpcd/trunk/39512.patch
Modified:
dhcpcd/trunk/PKGBUILD
-------------+
39512.patch | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
PKGBUILD | 14 +++++++++++---
2 files changed, 64 insertions(+), 3 deletions(-)
Added: 39512.patch
===================================================================
--- 39512.patch (rev 0)
+++ 39512.patch 2014-06-03 19:41:56 UTC (rev 214107)
@@ -0,0 +1,53 @@
+@@ -2629,33 +2629,40 @@
+ free(dhcp);
+ }
+
+ static void
+-dhcp_handleudp(void *arg)
++dhcp_handleudp1(struct dhcpcd_ctx *ctx, int *fd, const char *ifname)
+ {
+- struct dhcpcd_ctx *ctx;
+ uint8_t buffer[sizeof(struct dhcp_message)];
+
+- ctx = arg;
+-
+ /* Just read what's in the UDP fd and discard it as we always read
+ * from the raw fd */
+- (void)read(ctx->udp_fd, buffer, sizeof(buffer));
++ if (read(*fd, buffer, sizeof(buffer)) == -1) {
++ syslog(LOG_ERR, "%s: %s: %m", ifname, __func__);
++ eloop_event_delete(ctx->eloop, *fd);
++ close(*fd);
++ *fd = -1;
++ }
++}
++
++static void
++dhcp_handleudp(void *arg)
++{
++ struct dhcpcd_ctx *ctx;
++
++ ctx = arg;
++ dhcp_handleudp1(arg, &ctx->udp_fd, NULL);
+ }
+
+ static void
+ dhcp_handleifudp(void *arg)
+ {
+ const struct interface *ifp;
+- const struct dhcp_state *state;
+- uint8_t buffer[sizeof(struct dhcp_message)];
++ struct dhcp_state *state;
+
+ ifp = arg;
+- state = D_CSTATE(ifp);
+-
+- /* Just read what's in the UDP fd and discard it as we always read
+- * from the raw fd */
+- (void)read(state->udp_fd, buffer, sizeof(buffer));
++ state = D_STATE(ifp);
++ dhcp_handleudp1(ifp->ctx, &state->udp_fd, ifp->name);
+ }
+
+ static int
+ dhcp_open(struct interface *ifp)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2014-06-03 16:40:41 UTC (rev 214106)
+++ PKGBUILD 2014-06-03 19:41:56 UTC (rev 214107)
@@ -5,7 +5,7 @@
pkgname=dhcpcd
pkgver=6.3.2
-pkgrel=1
+pkgrel=2
pkgdesc="RFC2131 compliant DHCP client daemon"
url="http://roy.marples.name/projects/dhcpcd/"
arch=('i686' 'x86_64')
@@ -17,11 +17,19 @@
options=('emptydirs') # We Need the Empty /var/lib/dhcpcd Directory
source=("http://roy.marples.name/downloads/$pkgname/$pkgname-$pkgver.tar.bz2"
'dhcpcd_.service'
- 'dhcpcd.service')
+ 'dhcpcd.service'
+ '39512.patch')
sha1sums=('ff8ef22b7305795eff52b8b41b81e2999a5923ff'
'6f1633edde14d29b5cdc09c4f029a450ef2ebc96'
- '52c1bad9ab43e9a253c1eb175e7eefb13497b8f9')
+ '52c1bad9ab43e9a253c1eb175e7eefb13497b8f9'
+ '22f29ac0948c0e0d177a48d939828132b73fcfc7')
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ # upstream patch for FS#39512
+ patch -Np0 dhcp.c ${srcdir}/39512.patch
+}
+
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
More information about the arch-commits
mailing list