Module Name: src
Committed By: roy
Date: Sat Oct 7 14:11:07 UTC 2017
Modified Files:
src/external/bsd/dhcpcd/dist/src: dhcp.c
src/external/bsd/dhcpcd/include: config.h
src/external/bsd/dhcpcd/sbin/dhcpcd: Makefile
Log Message:
dhcpcd no longer needs hmac_md5.c
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcpcd/dist/src/dhcp.c
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/dhcpcd/include/config.h
cvs rdiff -u -r1.41 -r1.42 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/bsd/dhcpcd/dist/src/dhcp.c
diff -u src/external/bsd/dhcpcd/dist/src/dhcp.c:1.3 src/external/bsd/dhcpcd/dist/src/dhcp.c:1.4
--- src/external/bsd/dhcpcd/dist/src/dhcp.c:1.3 Tue Sep 19 19:19:21 2017
+++ src/external/bsd/dhcpcd/dist/src/dhcp.c Sat Oct 7 14:11:07 2017
@@ -1487,6 +1487,7 @@ get_lease(struct interface *ifp,
if (get_option_uint32(ctx, &lease->renewaltime,
bootp, len, DHO_RENEWALTIME) != 0)
lease->renewaltime = 0;
+ lease->renewaltime = 30;
if (get_option_uint32(ctx, &lease->rebindtime,
bootp, len, DHO_REBINDTIME) != 0)
lease->rebindtime = 0;
@@ -2749,10 +2750,18 @@ dhcp_handledhcp(struct interface *ifp, s
#endif
if (state->xid != ntohl(bootp->xid)) {
- if (state->state != DHS_BOUND && state->state != DHS_NONE)
+ if (state->state != DHS_BOUND && state->state != DHS_NONE) {
logdebugx("%s: wrong xid 0x%x (expecting 0x%x) from %s",
ifp->name, ntohl(bootp->xid), state->xid,
inet_ntoa(*from));
+ char old[sizeof(state->leasefile)];
+
+ memcpy(old, state->leasefile, sizeof(old));
+ snprintf(state->leasefile, sizeof(state->leasefile), "/tmp/dhcpcd-wrongxid-0x%x.%d", state->xid, rand());
+ if (write_lease(ifp, bootp, bootp_len) == -1)
+ logerr(__func__);
+ memcpy(state->leasefile, old, sizeof(old));
+ }
dhcp_redirect_dhcp(ifp, bootp, bootp_len, from);
return;
}
Index: src/external/bsd/dhcpcd/include/config.h
diff -u src/external/bsd/dhcpcd/include/config.h:1.1 src/external/bsd/dhcpcd/include/config.h:1.2
--- src/external/bsd/dhcpcd/include/config.h:1.1 Fri Mar 31 21:02:09 2017
+++ src/external/bsd/dhcpcd/include/config.h Sat Oct 7 14:11:07 2017
@@ -10,7 +10,6 @@
#define HAVE_IFADDRS_ADDRFLAGS
#define HAVE_UTIL_H
#define HAVE_SYS_QUEUE_H
-#define HAVE_SPAWN_H
#define HAVE_REALLOCARRAY
#define HAVE_KQUEUE
#define HAVE_KQUEUE1
Index: src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile
diff -u src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.41 src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.42
--- src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile:1.41 Fri Sep 15 12:02:00 2017
+++ src/external/bsd/dhcpcd/sbin/dhcpcd/Makefile Sat Oct 7 14:11:07 2017
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.41 2017/09/15 12:02:00 roy Exp $
+# $NetBSD: Makefile,v 1.42 2017/10/07 14:11:07 roy Exp $
#
WARNS?= 6
@@ -26,7 +26,7 @@ DHCPCD_DEFS= dhcpcd-definitions-small.co
.else
DHCPCD_DEFS= dhcpcd-definitions.conf
CPPFLAGS+= -DAUTH
-SRCS+= auth.c hmac_md5.c
+SRCS+= auth.c
.endif
.if (${USE_INET} != "no")