Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/dhcpcd/dist Sync
details: https://anonhg.NetBSD.org/src/rev/f449e91aea39
branches: trunk
changeset: 332735:f449e91aea39
user: roy <roy%NetBSD.org@localhost>
date: Mon Oct 06 18:22:29 2014 +0000
description:
Sync
diffstat:
external/bsd/dhcpcd/dist/arp.c | 2 +-
external/bsd/dhcpcd/dist/arp.h | 2 +-
external/bsd/dhcpcd/dist/auth.c | 2 +-
external/bsd/dhcpcd/dist/auth.h | 2 +-
external/bsd/dhcpcd/dist/bpf-filter.h | 2 +-
external/bsd/dhcpcd/dist/common.c | 2 +-
external/bsd/dhcpcd/dist/common.h | 2 +-
external/bsd/dhcpcd/dist/config.h | 2 +-
external/bsd/dhcpcd/dist/control.c | 2 +-
external/bsd/dhcpcd/dist/control.h | 2 +-
external/bsd/dhcpcd/dist/crypt/crypt.h | 2 +-
external/bsd/dhcpcd/dist/crypt/hmac_md5.c | 2 +-
external/bsd/dhcpcd/dist/defs.h | 2 +-
external/bsd/dhcpcd/dist/dev.h | 2 +-
external/bsd/dhcpcd/dist/dhcp-common.c | 2 +-
external/bsd/dhcpcd/dist/dhcp-common.h | 2 +-
external/bsd/dhcpcd/dist/dhcp.c | 43 ++++-
external/bsd/dhcpcd/dist/dhcp.h | 2 +-
external/bsd/dhcpcd/dist/dhcp6.c | 2 +-
external/bsd/dhcpcd/dist/dhcp6.h | 2 +-
external/bsd/dhcpcd/dist/dhcpcd-definitions.conf | 2 +-
external/bsd/dhcpcd/dist/dhcpcd-embedded.c | 2 +-
external/bsd/dhcpcd/dist/dhcpcd-embedded.h | 2 +-
external/bsd/dhcpcd/dist/dhcpcd-hooks/01-test | 2 +-
external/bsd/dhcpcd/dist/dhcpcd-hooks/02-dump | 2 +-
external/bsd/dhcpcd/dist/dhcpcd-hooks/10-mtu | 2 +-
external/bsd/dhcpcd/dist/dhcpcd-hooks/10-wpa_supplicant | 2 +-
external/bsd/dhcpcd/dist/dhcpcd-hooks/15-timezone | 2 +-
external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf | 2 +-
external/bsd/dhcpcd/dist/dhcpcd-hooks/29-lookup-hostname | 2 +-
external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname | 2 +-
external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ntp.conf | 2 +-
external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ypbind | 2 +-
external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in | 33 +--
external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in | 2 +-
external/bsd/dhcpcd/dist/dhcpcd.8.in | 34 +----
external/bsd/dhcpcd/dist/dhcpcd.c | 45 +++--
external/bsd/dhcpcd/dist/dhcpcd.conf | 2 +-
external/bsd/dhcpcd/dist/dhcpcd.conf.5.in | 10 +-
external/bsd/dhcpcd/dist/dhcpcd.h | 2 +-
external/bsd/dhcpcd/dist/duid.c | 2 +-
external/bsd/dhcpcd/dist/duid.h | 2 +-
external/bsd/dhcpcd/dist/eloop.c | 2 +-
external/bsd/dhcpcd/dist/eloop.h | 2 +-
external/bsd/dhcpcd/dist/if-bsd.c | 110 +++++++++++---
external/bsd/dhcpcd/dist/if-options.c | 16 +-
external/bsd/dhcpcd/dist/if-options.h | 2 +-
external/bsd/dhcpcd/dist/if.c | 2 +-
external/bsd/dhcpcd/dist/if.h | 2 +-
external/bsd/dhcpcd/dist/ipv4.c | 2 +-
external/bsd/dhcpcd/dist/ipv4.h | 2 +-
external/bsd/dhcpcd/dist/ipv4ll.c | 2 +-
external/bsd/dhcpcd/dist/ipv4ll.h | 2 +-
external/bsd/dhcpcd/dist/ipv6.c | 2 +-
external/bsd/dhcpcd/dist/ipv6.h | 2 +-
external/bsd/dhcpcd/dist/ipv6nd.c | 11 +-
external/bsd/dhcpcd/dist/ipv6nd.h | 2 +-
external/bsd/dhcpcd/dist/script.c | 38 +---
external/bsd/dhcpcd/dist/script.h | 2 +-
59 files changed, 244 insertions(+), 196 deletions(-)
diffs (truncated from 1227 to 300 lines):
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/arp.c
--- a/external/bsd/dhcpcd/dist/arp.c Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/arp.c Mon Oct 06 18:22:29 2014 +0000
@@ -1,5 +1,5 @@
#include <sys/cdefs.h>
- __RCSID("$NetBSD: arp.c,v 1.1.1.14 2014/09/16 22:23:18 roy Exp $");
+ __RCSID("$NetBSD: arp.c,v 1.2 2014/10/06 18:22:29 roy Exp $");
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/arp.h
--- a/external/bsd/dhcpcd/dist/arp.h Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/arp.h Mon Oct 06 18:22:29 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arp.h,v 1.1.1.4 2014/02/25 13:14:30 roy Exp $ */
+/* $NetBSD: arp.h,v 1.2 2014/10/06 18:22:29 roy Exp $ */
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/auth.c
--- a/external/bsd/dhcpcd/dist/auth.c Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/auth.c Mon Oct 06 18:22:29 2014 +0000
@@ -1,5 +1,5 @@
#include <sys/cdefs.h>
- __RCSID("$NetBSD: auth.c,v 1.1.1.4 2014/06/14 20:51:05 roy Exp $");
+ __RCSID("$NetBSD: auth.c,v 1.2 2014/10/06 18:22:29 roy Exp $");
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/auth.h
--- a/external/bsd/dhcpcd/dist/auth.h Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/auth.h Mon Oct 06 18:22:29 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: auth.h,v 1.1.1.2 2014/06/14 20:51:06 roy Exp $ */
+/* $NetBSD: auth.h,v 1.2 2014/10/06 18:22:29 roy Exp $ */
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/bpf-filter.h
--- a/external/bsd/dhcpcd/dist/bpf-filter.h Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/bpf-filter.h Mon Oct 06 18:22:29 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bpf-filter.h,v 1.4 2014/06/14 20:55:37 roy Exp $ */
+/* $NetBSD: bpf-filter.h,v 1.5 2014/10/06 18:22:29 roy Exp $ */
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/common.c
--- a/external/bsd/dhcpcd/dist/common.c Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/common.c Mon Oct 06 18:22:29 2014 +0000
@@ -1,5 +1,5 @@
#include <sys/cdefs.h>
- __RCSID("$NetBSD: common.c,v 1.1.1.15 2014/06/14 20:51:03 roy Exp $");
+ __RCSID("$NetBSD: common.c,v 1.2 2014/10/06 18:22:29 roy Exp $");
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/common.h
--- a/external/bsd/dhcpcd/dist/common.h Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/common.h Mon Oct 06 18:22:29 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: common.h,v 1.1.1.11 2014/06/14 20:51:06 roy Exp $ */
+/* $NetBSD: common.h,v 1.2 2014/10/06 18:22:29 roy Exp $ */
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/config.h
--- a/external/bsd/dhcpcd/dist/config.h Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/config.h Mon Oct 06 18:22:29 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: config.h,v 1.1.1.28 2014/10/06 18:20:19 roy Exp $ */
+/* $NetBSD: config.h,v 1.2 2014/10/06 18:22:29 roy Exp $ */
/* netbsd */
#define SYSCONFDIR "/etc"
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/control.c
--- a/external/bsd/dhcpcd/dist/control.c Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/control.c Mon Oct 06 18:22:29 2014 +0000
@@ -1,5 +1,5 @@
#include <sys/cdefs.h>
- __RCSID("$NetBSD: control.c,v 1.1.1.9 2014/10/06 18:20:16 roy Exp $");
+ __RCSID("$NetBSD: control.c,v 1.2 2014/10/06 18:22:29 roy Exp $");
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/control.h
--- a/external/bsd/dhcpcd/dist/control.h Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/control.h Mon Oct 06 18:22:29 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: control.h,v 1.1.1.6 2014/09/16 22:23:21 roy Exp $ */
+/* $NetBSD: control.h,v 1.2 2014/10/06 18:22:29 roy Exp $ */
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/crypt/crypt.h
--- a/external/bsd/dhcpcd/dist/crypt/crypt.h Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/crypt/crypt.h Mon Oct 06 18:22:29 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: crypt.h,v 1.1.1.2 2014/06/14 20:51:09 roy Exp $ */
+/* $NetBSD: crypt.h,v 1.2 2014/10/06 18:22:30 roy Exp $ */
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/crypt/hmac_md5.c
--- a/external/bsd/dhcpcd/dist/crypt/hmac_md5.c Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/crypt/hmac_md5.c Mon Oct 06 18:22:29 2014 +0000
@@ -1,5 +1,5 @@
#include <sys/cdefs.h>
- __RCSID("$NetBSD: hmac_md5.c,v 1.1.1.4 2014/07/30 15:44:11 roy Exp $");
+ __RCSID("$NetBSD: hmac_md5.c,v 1.2 2014/10/06 18:22:30 roy Exp $");
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/defs.h
--- a/external/bsd/dhcpcd/dist/defs.h Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/defs.h Mon Oct 06 18:22:29 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: defs.h,v 1.1.1.46 2014/10/06 18:20:19 roy Exp $ */
+/* $NetBSD: defs.h,v 1.2 2014/10/06 18:22:29 roy Exp $ */
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/dev.h
--- a/external/bsd/dhcpcd/dist/dev.h Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/dev.h Mon Oct 06 18:22:29 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dev.h,v 1.1.1.5 2014/10/06 18:20:19 roy Exp $ */
+/* $NetBSD: dev.h,v 1.2 2014/10/06 18:22:29 roy Exp $ */
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/dhcp-common.c
--- a/external/bsd/dhcpcd/dist/dhcp-common.c Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/dhcp-common.c Mon Oct 06 18:22:29 2014 +0000
@@ -1,5 +1,5 @@
#include <sys/cdefs.h>
- __RCSID("$NetBSD: dhcp-common.c,v 1.1.1.10 2014/10/06 18:20:17 roy Exp $");
+ __RCSID("$NetBSD: dhcp-common.c,v 1.2 2014/10/06 18:22:29 roy Exp $");
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/dhcp-common.h
--- a/external/bsd/dhcpcd/dist/dhcp-common.h Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/dhcp-common.h Mon Oct 06 18:22:29 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dhcp-common.h,v 1.1.1.7 2014/10/06 18:20:19 roy Exp $ */
+/* $NetBSD: dhcp-common.h,v 1.2 2014/10/06 18:22:29 roy Exp $ */
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/dhcp.c
--- a/external/bsd/dhcpcd/dist/dhcp.c Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/dhcp.c Mon Oct 06 18:22:29 2014 +0000
@@ -1,5 +1,5 @@
#include <sys/cdefs.h>
- __RCSID("$NetBSD: dhcp.c,v 1.17 2014/09/27 01:17:34 roy Exp $");
+ __RCSID("$NetBSD: dhcp.c,v 1.18 2014/10/06 18:22:29 roy Exp $");
/*
* dhcpcd - DHCP client daemon
@@ -135,6 +135,7 @@
const char * const *p;
size_t i, j;
const struct dhcp_opt *opt, *opt2;
+ int cols;
for (p = dhcp_params; *p; p++)
printf(" %s\n", *p);
@@ -143,11 +144,15 @@
for (j = 0, opt2 = opts; j < opts_len; j++, opt2++)
if (opt->option == opt2->option)
break;
- if (j == opts_len)
- printf("%03d %s\n", opt->option, opt->var);
+ if (j == opts_len) {
+ cols = printf("%03d %s", opt->option, opt->var);
+ dhcp_print_option_encoding(opt, cols);
+ }
}
- for (i = 0, opt = opts; i < opts_len; i++, opt++)
- printf("%03d %s\n", opt->option, opt->var);
+ for (i = 0, opt = opts; i < opts_len; i++, opt++) {
+ cols = printf("%03d %s", opt->option, opt->var);
+ dhcp_print_option_encoding(opt, cols);
+ }
}
#define get_option_raw(ctx, dhcp, opt) get_option(ctx, dhcp, opt, NULL)
@@ -1272,12 +1277,12 @@
}
if (*dhcp->bootfile && !(overl & 1)) {
- print_string(safe, sizeof(safe),
+ print_string(safe, sizeof(safe), STRING,
dhcp->bootfile, sizeof(dhcp->bootfile));
setvar(&ep, prefix, "filename", safe);
}
if (*dhcp->servername && !(overl & 2)) {
- print_string(safe, sizeof(safe),
+ print_string(safe, sizeof(safe), STRING | DOMAIN,
dhcp->servername, sizeof(dhcp->servername));
setvar(&ep, prefix, "server_name", safe);
}
@@ -2193,9 +2198,25 @@
struct in_addr addr;
int r;
- if (strcmp(msg, "NAK:") == 0)
+ if (strcmp(msg, "NAK:") == 0) {
a = get_option_string(iface->ctx, dhcp, DHO_MESSAGE);
- else if (ad && dhcp->yiaddr != 0) {
+ if (a) {
+ char *tmp;
+ size_t al, tmpl;
+
+ al = strlen(a);
+ tmpl = (al * 4) + 1;
+ tmp = malloc(tmpl);
+ if (tmp == NULL) {
+ syslog(LOG_ERR, "%s: %m", __func__);
+ free(a);
+ return;
+ }
+ print_string(tmp, tmpl, STRING, (uint8_t *)a, al);
+ free(a);
+ a = tmp;
+ }
+ } else if (ad && dhcp->yiaddr != 0) {
addr.s_addr = dhcp->yiaddr;
a = strdup(inet_ntoa(addr));
if (a == NULL) {
@@ -2208,7 +2229,7 @@
tfrom = "from";
r = get_option_addr(iface->ctx, &addr, dhcp, DHO_SERVERID);
if (dhcp->servername[0] && r == 0) {
- print_string(sname, sizeof(sname),
+ print_string(sname, sizeof(sname), STRING,
dhcp->servername, strlen((const char *)dhcp->servername));
if (a == NULL)
syslog(lvl, "%s: %s %s %s `%s'", iface->name, msg,
@@ -2694,7 +2715,7 @@
{
char buf[sizeof(dhcp->chaddr) * 3];
- syslog(LOG_DEBUG, "%s: xid 0x%x is not for hwaddr %s",
+ syslog(LOG_DEBUG, "%s: xid 0x%x is for hwaddr %s",
ifp->name, ntohl(dhcp->xid),
hwaddr_ntoa(dhcp->chaddr, sizeof(dhcp->chaddr),
buf, sizeof(buf)));
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/dhcp.h
--- a/external/bsd/dhcpcd/dist/dhcp.h Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/dhcp.h Mon Oct 06 18:22:29 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dhcp.h,v 1.1.1.21 2014/09/16 22:23:21 roy Exp $ */
+/* $NetBSD: dhcp.h,v 1.2 2014/10/06 18:22:29 roy Exp $ */
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/dhcp6.c
--- a/external/bsd/dhcpcd/dist/dhcp6.c Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/dhcp6.c Mon Oct 06 18:22:29 2014 +0000
@@ -1,5 +1,5 @@
#include <sys/cdefs.h>
- __RCSID("$NetBSD: dhcp6.c,v 1.1.1.17 2014/10/06 18:20:18 roy Exp $");
+ __RCSID("$NetBSD: dhcp6.c,v 1.2 2014/10/06 18:22:29 roy Exp $");
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/dhcp6.h
--- a/external/bsd/dhcpcd/dist/dhcp6.h Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/dhcp6.h Mon Oct 06 18:22:29 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dhcp6.h,v 1.1.1.9 2014/10/06 18:20:19 roy Exp $ */
+/* $NetBSD: dhcp6.h,v 1.2 2014/10/06 18:22:29 roy Exp $ */
/*
* dhcpcd - DHCP client daemon
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/dhcpcd-definitions.conf
--- a/external/bsd/dhcpcd/dist/dhcpcd-definitions.conf Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/dhcpcd-definitions.conf Mon Oct 06 18:22:29 2014 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: dhcpcd-definitions.conf,v 1.1.1.6 2014/10/06 18:20:19 roy Exp $
+# $NetBSD: dhcpcd-definitions.conf,v 1.2 2014/10/06 18:22:29 roy Exp $
# Copyright (c) 2006-2014 Roy Marples
# All rights reserved
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/dhcpcd-embedded.c
--- a/external/bsd/dhcpcd/dist/dhcpcd-embedded.c Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/dhcpcd-embedded.c Mon Oct 06 18:22:29 2014 +0000
@@ -1,5 +1,5 @@
#include <sys/cdefs.h>
- __RCSID("$NetBSD: dhcpcd-embedded.c,v 1.1.1.8 2014/10/06 18:20:17 roy Exp $");
+ __RCSID("$NetBSD: dhcpcd-embedded.c,v 1.2 2014/10/06 18:22:29 roy Exp $");
/*
* DO NOT EDIT
diff -r d0c3d6e8596c -r f449e91aea39 external/bsd/dhcpcd/dist/dhcpcd-embedded.h
--- a/external/bsd/dhcpcd/dist/dhcpcd-embedded.h Mon Oct 06 18:20:16 2014 +0000
+++ b/external/bsd/dhcpcd/dist/dhcpcd-embedded.h Mon Oct 06 18:22:29 2014 +0000
@@ -1,4 +1,4 @@
Home |
Main Index |
Thread Index |
Old Index