[arch-commits] Commit in dhcpcd/repos (12 files)
Anatol Pomozov
anatolik at nymeria.archlinux.org
Fri Mar 14 02:06:43 UTC 2014
Date: Friday, March 14, 2014 @ 03:06:43
Author: anatolik
Revision: 207728
archrelease: copy trunk to testing-i686, testing-x86_64
Added:
dhcpcd/repos/testing-i686/
dhcpcd/repos/testing-i686/PKGBUILD
(from rev 207727, dhcpcd/trunk/PKGBUILD)
dhcpcd/repos/testing-i686/commit_9eaeccdf1d.diff
(from rev 207727, dhcpcd/trunk/commit_9eaeccdf1d.diff)
dhcpcd/repos/testing-i686/commit_e348e99776.diff
(from rev 207727, dhcpcd/trunk/commit_e348e99776.diff)
dhcpcd/repos/testing-i686/dhcpcd.service
(from rev 207727, dhcpcd/trunk/dhcpcd.service)
dhcpcd/repos/testing-i686/dhcpcd_.service
(from rev 207727, dhcpcd/trunk/dhcpcd_.service)
dhcpcd/repos/testing-x86_64/
dhcpcd/repos/testing-x86_64/PKGBUILD
(from rev 207727, dhcpcd/trunk/PKGBUILD)
dhcpcd/repos/testing-x86_64/commit_9eaeccdf1d.diff
(from rev 207727, dhcpcd/trunk/commit_9eaeccdf1d.diff)
dhcpcd/repos/testing-x86_64/commit_e348e99776.diff
(from rev 207727, dhcpcd/trunk/commit_e348e99776.diff)
dhcpcd/repos/testing-x86_64/dhcpcd.service
(from rev 207727, dhcpcd/trunk/dhcpcd.service)
dhcpcd/repos/testing-x86_64/dhcpcd_.service
(from rev 207727, dhcpcd/trunk/dhcpcd_.service)
---------------------------------------+
testing-i686/PKGBUILD | 71 +++++++++++
testing-i686/commit_9eaeccdf1d.diff | 191 ++++++++++++++++++++++++++++++++
testing-i686/commit_e348e99776.diff | 17 ++
testing-i686/dhcpcd.service | 13 ++
testing-i686/dhcpcd_.service | 15 ++
testing-x86_64/PKGBUILD | 71 +++++++++++
testing-x86_64/commit_9eaeccdf1d.diff | 191 ++++++++++++++++++++++++++++++++
testing-x86_64/commit_e348e99776.diff | 17 ++
testing-x86_64/dhcpcd.service | 13 ++
testing-x86_64/dhcpcd_.service | 15 ++
10 files changed, 614 insertions(+)
Copied: dhcpcd/repos/testing-i686/PKGBUILD (from rev 207727, dhcpcd/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD (rev 0)
+++ testing-i686/PKGBUILD 2014-03-14 02:06:43 UTC (rev 207728)
@@ -0,0 +1,71 @@
+# $Id$
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Tom Killian <tom.archlinux.org>
+# Contributor: Judd Vinet <jvinet.zeroflux.org>
+
+pkgname=dhcpcd
+pkgver=6.3.1
+pkgrel=2
+pkgdesc="RFC2131 compliant DHCP client daemon"
+url="http://roy.marples.name/projects/dhcpcd/"
+arch=('i686' 'x86_64')
+license=('BSD')
+groups=('base')
+depends=('glibc' 'sh')
+provides=('dhcp-client')
+backup=('etc/dhcpcd.conf')
+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'
+ 'commit_9eaeccdf1d.diff'
+ 'commit_e348e99776.diff')
+sha1sums=('4db014c7eeca57fea7f954640e68feaa1d249c79'
+ '6f1633edde14d29b5cdc09c4f029a450ef2ebc96'
+ '52c1bad9ab43e9a253c1eb175e7eefb13497b8f9'
+ '6a381ec2638eba6812a76b0f362e59f283c30168'
+ 'c81283b4918370992f2f717a3139a23748c6a46d')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -p0 -i "${srcdir}/commit_9eaeccdf1d.diff"
+ patch -p0 -i "${srcdir}/commit_e348e99776.diff"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # configure variables
+ ./configure \
+ --sbindir=/usr/bin \
+ --libexecdir=/usr/lib/dhcpcd \
+ --dbdir=/var/lib/dhcpcd \
+ --rundir=/run
+
+ # Build
+ make
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make test
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ # Install License
+ install -d "$pkgdir/usr/share/licenses/$pkgname"
+ sed 26q "$srcdir/$pkgname-$pkgver/control.h" \
+ >>"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # Set Options in /etc/dhcpcd.conf
+ echo noipv4ll >> "${pkgdir}/etc/dhcpcd.conf" # Disable ip4vall
+
+ # install systemd files
+ install -Dm644 "${srcdir}/dhcpcd_.service" "${pkgdir}/usr/lib/systemd/system/dhcpcd at .service"
+ install -Dm644 "${srcdir}/dhcpcd.service" "${pkgdir}/usr/lib/systemd/system/dhcpcd.service" # FS#31543
+}
Copied: dhcpcd/repos/testing-i686/commit_9eaeccdf1d.diff (from rev 207727, dhcpcd/trunk/commit_9eaeccdf1d.diff)
===================================================================
--- testing-i686/commit_9eaeccdf1d.diff (rev 0)
+++ testing-i686/commit_9eaeccdf1d.diff 2014-03-14 02:06:43 UTC (rev 207728)
@@ -0,0 +1,191 @@
+Index: auth.c
+==================================================================
+--- auth.c
++++ auth.c
+@@ -229,10 +229,15 @@
+ errno = EINVAL;
+ return NULL;
+ }
+ if (state->reconf == NULL)
+ errno = ENOENT;
++ /* Free the old token so we log acceptance */
++ if (state->token) {
++ free(state->token);
++ state->token = NULL;
++ }
+ /* Nothing to validate, just accepting the key */
+ return state->reconf;
+ case 2:
+ if (!((mp == 4 && mt == DHCP_FORCERENEW) ||
+ (mp == 6 && mt == DHCP6_RECONFIGURE)))
+
+Index: dhcp.c
+==================================================================
+--- dhcp.c
++++ dhcp.c
+@@ -1059,12 +1059,16 @@
+ syslog(LOG_DEBUG, "%s: dhcp_auth_validate: %m",
+ ifp->name);
+ free(dhcp);
+ return NULL;
+ }
+- syslog(LOG_DEBUG, "%s: validated using 0x%08" PRIu32,
+- ifp->name, state->auth.token->secretid);
++ if (state->auth.token)
++ syslog(LOG_DEBUG, "%s: validated using 0x%08" PRIu32,
++ ifp->name, state->auth.token->secretid);
++ else
++ syslog(LOG_DEBUG, "%s: accepted reconfigure key",
++ ifp->name);
+ }
+
+ return dhcp;
+ }
+
+@@ -2195,12 +2199,16 @@
+ iface->name);
+ log_dhcp1(LOG_ERR, "authentication failed",
+ iface, dhcp, from, 0);
+ return;
+ }
+- syslog(LOG_DEBUG, "%s: validated using 0x%08" PRIu32,
+- iface->name, state->auth.token->secretid);
++ if (state->auth.token)
++ syslog(LOG_DEBUG, "%s: validated using 0x%08" PRIu32,
++ iface->name, state->auth.token->secretid);
++ else
++ syslog(LOG_DEBUG, "%s: accepted reconfigure key",
++ iface->name);
+ } else if (ifo->auth.options & DHCPCD_AUTH_REQUIRE) {
+ log_dhcp1(LOG_ERR, "no authentication", iface, dhcp, from, 0);
+ return;
+ } else if (ifo->auth.options & DHCPCD_AUTH_SEND)
+ log_dhcp1(LOG_WARNING, "no authentication",
+
+Index: dhcp6.c
+==================================================================
+--- dhcp6.c
++++ dhcp6.c
+@@ -1458,18 +1458,18 @@
+ {
+ struct dhcp6_state *state;
+ const struct if_options *ifo;
+ const struct dhcp6_option *o;
+ const uint8_t *p;
+- int i;
++ int i, e;
+ uint32_t u32, renew, rebind;
+ uint8_t iaid[4];
+ size_t ol;
+ struct ipv6_addr *ap, *nap;
+
+ ifo = ifp->options;
+- i = 0;
++ i = e = 0;
+ state = D6_STATE(ifp);
+ TAILQ_FOREACH(ap, &state->addrs, next) {
+ ap->flags |= IPV6_AF_STALE;
+ }
+ while ((o = dhcp6_findoption(ifo->ia_type, d, l))) {
+@@ -1498,12 +1498,14 @@
+ rebind = ntohl(u32);
+ p += sizeof(u32);
+ ol -= sizeof(u32);
+ } else
+ renew = rebind = 0; /* appease gcc */
+- if (dhcp6_checkstatusok(ifp, NULL, p, ol) == -1)
++ if (dhcp6_checkstatusok(ifp, NULL, p, ol) == -1) {
++ e = 1;
+ continue;
++ }
+ if (ifo->ia_type == D6_OPTION_IA_PD) {
+ if (dhcp6_findpd(ifp, iaid, p, ol) == 0) {
+ syslog(LOG_WARNING,
+ "%s: %s: DHCPv6 REPLY missing Prefix",
+ ifp->name, sfrom);
+@@ -1542,10 +1544,12 @@
+ eloop_q_timeout_delete(ap->iface->ctx->eloop,
+ 0, NULL, ap);
+ free(ap);
+ }
+ }
++ if (i == 0 && e)
++ return -1;
+ return i;
+ }
+
+ static int
+ dhcp6_validatelease(struct interface *ifp,
+@@ -1657,12 +1661,16 @@
+ ifp->name);
+ syslog(LOG_ERR, "%s: authentication failed",
+ ifp->name);
+ goto ex;
+ }
+- syslog(LOG_DEBUG, "%s: validated using 0x%08" PRIu32,
+- ifp->name, state->auth.token->secretid);
++ if (state->auth.token)
++ syslog(LOG_DEBUG, "%s: validated using 0x%08" PRIu32,
++ ifp->name, state->auth.token->secretid);
++ else
++ syslog(LOG_DEBUG, "%s: accepted reconfigure key",
++ ifp->name);
+ } else if (ifp->options->auth.options & DHCPCD_AUTH_REQUIRE) {
+ syslog(LOG_ERR, "%s: authentication now required", ifp->name);
+ goto ex;
+ }
+
+@@ -2053,14 +2061,17 @@
+ if (state == NULL || state->send == NULL) {
+ syslog(LOG_DEBUG, "%s: DHCPv6 reply received but not running",
+ ifp->name);
+ return;
+ }
++
++ r = (struct dhcp6_message *)ctx->rcvhdr.msg_iov[0].iov_base;
++
+ /* We're already bound and this message is for another machine */
+ /* XXX DELEGATED? */
+- if (state->state == DH6S_BOUND ||
+- state->state == DH6S_INFORMED)
++ if (r->type != DHCP6_RECONFIGURE &&
++ (state->state == DH6S_BOUND || state->state == DH6S_INFORMED))
+ return;
+
+ r = (struct dhcp6_message *)ctx->rcvhdr.msg_iov[0].iov_base;
+ if (r->type != DHCP6_RECONFIGURE &&
+ (r->xid[0] != state->send->xid[0] ||
+@@ -2119,12 +2130,16 @@
+ syslog(LOG_DEBUG, "dhcp_auth_validate: %m");
+ syslog(LOG_ERR, "%s: authentication failed from %s",
+ ifp->name, ctx->sfrom);
+ return;
+ }
+- syslog(LOG_DEBUG, "%s: validated using 0x%08" PRIu32,
+- ifp->name, state->auth.token->secretid);
++ if (state->auth.token)
++ syslog(LOG_DEBUG, "%s: validated using 0x%08" PRIu32,
++ ifp->name, state->auth.token->secretid);
++ else
++ syslog(LOG_DEBUG, "%s: accepted reconfigure key",
++ ifp->name);
+ } else if (ifo->auth.options & DHCPCD_AUTH_REQUIRE) {
+ syslog(LOG_ERR, "%s: no authentication from %s",
+ ifp->name, ctx->sfrom);
+ return;
+ } else if (ifo->auth.options & DHCPCD_AUTH_SEND)
+@@ -2155,11 +2170,12 @@
+ * didn't get the IA's returned, so preserve them
+ * from our saved response */
+ if (error == 1)
+ goto recv;
+ if (error == -1 ||
+- dhcp6_validatelease(ifp, r, len, ctx->sfrom) == -1){
++ dhcp6_validatelease(ifp, r, len, ctx->sfrom) == -1)
++ {
+ dhcp6_startdiscover(ifp);
+ return;
+ }
+ break;
+ case DH6S_DISCOVER:
+
Copied: dhcpcd/repos/testing-i686/commit_e348e99776.diff (from rev 207727, dhcpcd/trunk/commit_e348e99776.diff)
===================================================================
--- testing-i686/commit_e348e99776.diff (rev 0)
+++ testing-i686/commit_e348e99776.diff 2014-03-14 02:06:43 UTC (rev 207728)
@@ -0,0 +1,17 @@
+Index: dhcp.c
+==================================================================
+--- dhcp.c
++++ dhcp.c
+@@ -2701,11 +2701,10 @@
+ if (state == NULL)
+ goto eexit;
+ ifp->options = calloc(1, sizeof(*ifp->options));
+ if (ifp->options == NULL)
+ goto eexit;
+- strlcpy(ifp->name, ifname, sizeof(ifp->name));
+ snprintf(state->leasefile, sizeof(state->leasefile),
+ LEASEFILE, ifp->name);
+ strlcpy(ifp->options->script, SCRIPT, sizeof(ifp->options->script));
+ state->new = read_lease(ifp);
+ if (state->new == NULL && errno == ENOENT) {
+
Copied: dhcpcd/repos/testing-i686/dhcpcd.service (from rev 207727, dhcpcd/trunk/dhcpcd.service)
===================================================================
--- testing-i686/dhcpcd.service (rev 0)
+++ testing-i686/dhcpcd.service 2014-03-14 02:06:43 UTC (rev 207728)
@@ -0,0 +1,13 @@
+[Unit]
+Description=dhcpcd on all interfaces
+Wants=network.target
+Before=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/dhcpcd.pid
+ExecStart=/usr/bin/dhcpcd -q -b
+ExecStop=/usr/bin/dhcpcd -x
+
+[Install]
+WantedBy=multi-user.target
Copied: dhcpcd/repos/testing-i686/dhcpcd_.service (from rev 207727, dhcpcd/trunk/dhcpcd_.service)
===================================================================
--- testing-i686/dhcpcd_.service (rev 0)
+++ testing-i686/dhcpcd_.service 2014-03-14 02:06:43 UTC (rev 207728)
@@ -0,0 +1,15 @@
+[Unit]
+Description=dhcpcd on %I
+Wants=network.target
+Before=network.target
+BindsTo=sys-subsystem-net-devices-%i.device
+After=sys-subsystem-net-devices-%i.device
+
+[Service]
+Type=forking
+PIDFile=/run/dhcpcd-%I.pid
+ExecStart=/usr/bin/dhcpcd -q -w %I
+ExecStop=/usr/bin/dhcpcd -x %I
+
+[Install]
+WantedBy=multi-user.target
Copied: dhcpcd/repos/testing-x86_64/PKGBUILD (from rev 207727, dhcpcd/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD (rev 0)
+++ testing-x86_64/PKGBUILD 2014-03-14 02:06:43 UTC (rev 207728)
@@ -0,0 +1,71 @@
+# $Id$
+# Maintainer: Ronald van Haren <ronald.archlinux.org>
+# Contributor: Tom Killian <tom.archlinux.org>
+# Contributor: Judd Vinet <jvinet.zeroflux.org>
+
+pkgname=dhcpcd
+pkgver=6.3.1
+pkgrel=2
+pkgdesc="RFC2131 compliant DHCP client daemon"
+url="http://roy.marples.name/projects/dhcpcd/"
+arch=('i686' 'x86_64')
+license=('BSD')
+groups=('base')
+depends=('glibc' 'sh')
+provides=('dhcp-client')
+backup=('etc/dhcpcd.conf')
+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'
+ 'commit_9eaeccdf1d.diff'
+ 'commit_e348e99776.diff')
+sha1sums=('4db014c7eeca57fea7f954640e68feaa1d249c79'
+ '6f1633edde14d29b5cdc09c4f029a450ef2ebc96'
+ '52c1bad9ab43e9a253c1eb175e7eefb13497b8f9'
+ '6a381ec2638eba6812a76b0f362e59f283c30168'
+ 'c81283b4918370992f2f717a3139a23748c6a46d')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ patch -p0 -i "${srcdir}/commit_9eaeccdf1d.diff"
+ patch -p0 -i "${srcdir}/commit_e348e99776.diff"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # configure variables
+ ./configure \
+ --sbindir=/usr/bin \
+ --libexecdir=/usr/lib/dhcpcd \
+ --dbdir=/var/lib/dhcpcd \
+ --rundir=/run
+
+ # Build
+ make
+}
+
+check() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make test
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+
+ # Install License
+ install -d "$pkgdir/usr/share/licenses/$pkgname"
+ sed 26q "$srcdir/$pkgname-$pkgver/control.h" \
+ >>"$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+
+ # Set Options in /etc/dhcpcd.conf
+ echo noipv4ll >> "${pkgdir}/etc/dhcpcd.conf" # Disable ip4vall
+
+ # install systemd files
+ install -Dm644 "${srcdir}/dhcpcd_.service" "${pkgdir}/usr/lib/systemd/system/dhcpcd at .service"
+ install -Dm644 "${srcdir}/dhcpcd.service" "${pkgdir}/usr/lib/systemd/system/dhcpcd.service" # FS#31543
+}
Copied: dhcpcd/repos/testing-x86_64/commit_9eaeccdf1d.diff (from rev 207727, dhcpcd/trunk/commit_9eaeccdf1d.diff)
===================================================================
--- testing-x86_64/commit_9eaeccdf1d.diff (rev 0)
+++ testing-x86_64/commit_9eaeccdf1d.diff 2014-03-14 02:06:43 UTC (rev 207728)
@@ -0,0 +1,191 @@
+Index: auth.c
+==================================================================
+--- auth.c
++++ auth.c
+@@ -229,10 +229,15 @@
+ errno = EINVAL;
+ return NULL;
+ }
+ if (state->reconf == NULL)
+ errno = ENOENT;
++ /* Free the old token so we log acceptance */
++ if (state->token) {
++ free(state->token);
++ state->token = NULL;
++ }
+ /* Nothing to validate, just accepting the key */
+ return state->reconf;
+ case 2:
+ if (!((mp == 4 && mt == DHCP_FORCERENEW) ||
+ (mp == 6 && mt == DHCP6_RECONFIGURE)))
+
+Index: dhcp.c
+==================================================================
+--- dhcp.c
++++ dhcp.c
+@@ -1059,12 +1059,16 @@
+ syslog(LOG_DEBUG, "%s: dhcp_auth_validate: %m",
+ ifp->name);
+ free(dhcp);
+ return NULL;
+ }
+- syslog(LOG_DEBUG, "%s: validated using 0x%08" PRIu32,
+- ifp->name, state->auth.token->secretid);
++ if (state->auth.token)
++ syslog(LOG_DEBUG, "%s: validated using 0x%08" PRIu32,
++ ifp->name, state->auth.token->secretid);
++ else
++ syslog(LOG_DEBUG, "%s: accepted reconfigure key",
++ ifp->name);
+ }
+
+ return dhcp;
+ }
+
+@@ -2195,12 +2199,16 @@
+ iface->name);
+ log_dhcp1(LOG_ERR, "authentication failed",
+ iface, dhcp, from, 0);
+ return;
+ }
+- syslog(LOG_DEBUG, "%s: validated using 0x%08" PRIu32,
+- iface->name, state->auth.token->secretid);
++ if (state->auth.token)
++ syslog(LOG_DEBUG, "%s: validated using 0x%08" PRIu32,
++ iface->name, state->auth.token->secretid);
++ else
++ syslog(LOG_DEBUG, "%s: accepted reconfigure key",
++ iface->name);
+ } else if (ifo->auth.options & DHCPCD_AUTH_REQUIRE) {
+ log_dhcp1(LOG_ERR, "no authentication", iface, dhcp, from, 0);
+ return;
+ } else if (ifo->auth.options & DHCPCD_AUTH_SEND)
+ log_dhcp1(LOG_WARNING, "no authentication",
+
+Index: dhcp6.c
+==================================================================
+--- dhcp6.c
++++ dhcp6.c
+@@ -1458,18 +1458,18 @@
+ {
+ struct dhcp6_state *state;
+ const struct if_options *ifo;
+ const struct dhcp6_option *o;
+ const uint8_t *p;
+- int i;
++ int i, e;
+ uint32_t u32, renew, rebind;
+ uint8_t iaid[4];
+ size_t ol;
+ struct ipv6_addr *ap, *nap;
+
+ ifo = ifp->options;
+- i = 0;
++ i = e = 0;
+ state = D6_STATE(ifp);
+ TAILQ_FOREACH(ap, &state->addrs, next) {
+ ap->flags |= IPV6_AF_STALE;
+ }
+ while ((o = dhcp6_findoption(ifo->ia_type, d, l))) {
+@@ -1498,12 +1498,14 @@
+ rebind = ntohl(u32);
+ p += sizeof(u32);
+ ol -= sizeof(u32);
+ } else
+ renew = rebind = 0; /* appease gcc */
+- if (dhcp6_checkstatusok(ifp, NULL, p, ol) == -1)
++ if (dhcp6_checkstatusok(ifp, NULL, p, ol) == -1) {
++ e = 1;
+ continue;
++ }
+ if (ifo->ia_type == D6_OPTION_IA_PD) {
+ if (dhcp6_findpd(ifp, iaid, p, ol) == 0) {
+ syslog(LOG_WARNING,
+ "%s: %s: DHCPv6 REPLY missing Prefix",
+ ifp->name, sfrom);
+@@ -1542,10 +1544,12 @@
+ eloop_q_timeout_delete(ap->iface->ctx->eloop,
+ 0, NULL, ap);
+ free(ap);
+ }
+ }
++ if (i == 0 && e)
++ return -1;
+ return i;
+ }
+
+ static int
+ dhcp6_validatelease(struct interface *ifp,
+@@ -1657,12 +1661,16 @@
+ ifp->name);
+ syslog(LOG_ERR, "%s: authentication failed",
+ ifp->name);
+ goto ex;
+ }
+- syslog(LOG_DEBUG, "%s: validated using 0x%08" PRIu32,
+- ifp->name, state->auth.token->secretid);
++ if (state->auth.token)
++ syslog(LOG_DEBUG, "%s: validated using 0x%08" PRIu32,
++ ifp->name, state->auth.token->secretid);
++ else
++ syslog(LOG_DEBUG, "%s: accepted reconfigure key",
++ ifp->name);
+ } else if (ifp->options->auth.options & DHCPCD_AUTH_REQUIRE) {
+ syslog(LOG_ERR, "%s: authentication now required", ifp->name);
+ goto ex;
+ }
+
+@@ -2053,14 +2061,17 @@
+ if (state == NULL || state->send == NULL) {
+ syslog(LOG_DEBUG, "%s: DHCPv6 reply received but not running",
+ ifp->name);
+ return;
+ }
++
++ r = (struct dhcp6_message *)ctx->rcvhdr.msg_iov[0].iov_base;
++
+ /* We're already bound and this message is for another machine */
+ /* XXX DELEGATED? */
+- if (state->state == DH6S_BOUND ||
+- state->state == DH6S_INFORMED)
++ if (r->type != DHCP6_RECONFIGURE &&
++ (state->state == DH6S_BOUND || state->state == DH6S_INFORMED))
+ return;
+
+ r = (struct dhcp6_message *)ctx->rcvhdr.msg_iov[0].iov_base;
+ if (r->type != DHCP6_RECONFIGURE &&
+ (r->xid[0] != state->send->xid[0] ||
+@@ -2119,12 +2130,16 @@
+ syslog(LOG_DEBUG, "dhcp_auth_validate: %m");
+ syslog(LOG_ERR, "%s: authentication failed from %s",
+ ifp->name, ctx->sfrom);
+ return;
+ }
+- syslog(LOG_DEBUG, "%s: validated using 0x%08" PRIu32,
+- ifp->name, state->auth.token->secretid);
++ if (state->auth.token)
++ syslog(LOG_DEBUG, "%s: validated using 0x%08" PRIu32,
++ ifp->name, state->auth.token->secretid);
++ else
++ syslog(LOG_DEBUG, "%s: accepted reconfigure key",
++ ifp->name);
+ } else if (ifo->auth.options & DHCPCD_AUTH_REQUIRE) {
+ syslog(LOG_ERR, "%s: no authentication from %s",
+ ifp->name, ctx->sfrom);
+ return;
+ } else if (ifo->auth.options & DHCPCD_AUTH_SEND)
+@@ -2155,11 +2170,12 @@
+ * didn't get the IA's returned, so preserve them
+ * from our saved response */
+ if (error == 1)
+ goto recv;
+ if (error == -1 ||
+- dhcp6_validatelease(ifp, r, len, ctx->sfrom) == -1){
++ dhcp6_validatelease(ifp, r, len, ctx->sfrom) == -1)
++ {
+ dhcp6_startdiscover(ifp);
+ return;
+ }
+ break;
+ case DH6S_DISCOVER:
+
Copied: dhcpcd/repos/testing-x86_64/commit_e348e99776.diff (from rev 207727, dhcpcd/trunk/commit_e348e99776.diff)
===================================================================
--- testing-x86_64/commit_e348e99776.diff (rev 0)
+++ testing-x86_64/commit_e348e99776.diff 2014-03-14 02:06:43 UTC (rev 207728)
@@ -0,0 +1,17 @@
+Index: dhcp.c
+==================================================================
+--- dhcp.c
++++ dhcp.c
+@@ -2701,11 +2701,10 @@
+ if (state == NULL)
+ goto eexit;
+ ifp->options = calloc(1, sizeof(*ifp->options));
+ if (ifp->options == NULL)
+ goto eexit;
+- strlcpy(ifp->name, ifname, sizeof(ifp->name));
+ snprintf(state->leasefile, sizeof(state->leasefile),
+ LEASEFILE, ifp->name);
+ strlcpy(ifp->options->script, SCRIPT, sizeof(ifp->options->script));
+ state->new = read_lease(ifp);
+ if (state->new == NULL && errno == ENOENT) {
+
Copied: dhcpcd/repos/testing-x86_64/dhcpcd.service (from rev 207727, dhcpcd/trunk/dhcpcd.service)
===================================================================
--- testing-x86_64/dhcpcd.service (rev 0)
+++ testing-x86_64/dhcpcd.service 2014-03-14 02:06:43 UTC (rev 207728)
@@ -0,0 +1,13 @@
+[Unit]
+Description=dhcpcd on all interfaces
+Wants=network.target
+Before=network.target
+
+[Service]
+Type=forking
+PIDFile=/run/dhcpcd.pid
+ExecStart=/usr/bin/dhcpcd -q -b
+ExecStop=/usr/bin/dhcpcd -x
+
+[Install]
+WantedBy=multi-user.target
Copied: dhcpcd/repos/testing-x86_64/dhcpcd_.service (from rev 207727, dhcpcd/trunk/dhcpcd_.service)
===================================================================
--- testing-x86_64/dhcpcd_.service (rev 0)
+++ testing-x86_64/dhcpcd_.service 2014-03-14 02:06:43 UTC (rev 207728)
@@ -0,0 +1,15 @@
+[Unit]
+Description=dhcpcd on %I
+Wants=network.target
+Before=network.target
+BindsTo=sys-subsystem-net-devices-%i.device
+After=sys-subsystem-net-devices-%i.device
+
+[Service]
+Type=forking
+PIDFile=/run/dhcpcd-%I.pid
+ExecStart=/usr/bin/dhcpcd -q -w %I
+ExecStop=/usr/bin/dhcpcd -x %I
+
+[Install]
+WantedBy=multi-user.target
More information about the arch-commits
mailing list