Module Name:    src
Committed By:   roy
Date:           Wed Jan 15 20:43:21 UTC 2014

Modified Files:
        src/external/bsd/dhcpcd/dist: dhcp.c dhcpcd.8.in if-options.c ipv6nd.c
            script.c

Log Message:
Sync


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/external/bsd/dhcpcd/dist/dhcp.c
cvs rdiff -u -r1.24 -r1.25 src/external/bsd/dhcpcd/dist/dhcpcd.8.in
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/dhcpcd/dist/if-options.c
cvs rdiff -u -r1.3 -r1.4 src/external/bsd/dhcpcd/dist/ipv6nd.c
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/dhcpcd/dist/script.c

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/dhcp.c
diff -u src/external/bsd/dhcpcd/dist/dhcp.c:1.8 src/external/bsd/dhcpcd/dist/dhcp.c:1.9
--- src/external/bsd/dhcpcd/dist/dhcp.c:1.8	Fri Jan  3 22:24:41 2014
+++ src/external/bsd/dhcpcd/dist/dhcp.c	Wed Jan 15 20:43:21 2014
@@ -1,9 +1,9 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: dhcp.c,v 1.8 2014/01/03 22:24:41 roy Exp $");
+ __RCSID("$NetBSD: dhcp.c,v 1.9 2014/01/15 20:43:21 roy Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2013 Roy Marples <[email protected]>
+ * Copyright (c) 2006-2014 Roy Marples <[email protected]>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
@@ -107,7 +107,7 @@ static const struct dhcp_op dhcp_ops[] =
 	{ 0, NULL }
 };
 
-static const char *dhcp_params[] = {
+static const char * const dhcp_params[] = {
 	"ip_address",
 	"subnet_cidr",
 	"network_number",
@@ -133,7 +133,7 @@ static int dhcp_open(struct interface *)
 void
 dhcp_printoptions(void)
 {
-	const char **p;
+	const char * const *p;
 	size_t i;
 	const struct dhcp_opt *opt;
 

Index: src/external/bsd/dhcpcd/dist/dhcpcd.8.in
diff -u src/external/bsd/dhcpcd/dist/dhcpcd.8.in:1.24 src/external/bsd/dhcpcd/dist/dhcpcd.8.in:1.25
--- src/external/bsd/dhcpcd/dist/dhcpcd.8.in:1.24	Fri Jan  3 22:24:41 2014
+++ src/external/bsd/dhcpcd/dist/dhcpcd.8.in	Wed Jan 15 20:43:21 2014
@@ -1,5 +1,5 @@
-.\"     $NetBSD: dhcpcd.8.in,v 1.24 2014/01/03 22:24:41 roy Exp $
-.\" Copyright (c) 2006-2013 Roy Marples
+.\"     $NetBSD: dhcpcd.8.in,v 1.25 2014/01/15 20:43:21 roy Exp $
+.\" Copyright (c) 2006-2014 Roy Marples
 .\" All rights reserved
 .\"
 .\" Redistribution and use in source and binary forms, with or without
@@ -23,7 +23,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd December 6, 2013
+.Dd January 8, 2014
 .Dt DHCPCD 8
 .Os
 .Sh NAME
@@ -649,9 +649,9 @@ running on the
 .Xr resolvconf 8
 .Sh STANDARDS
 RFC\ 951 RFC\ 1534 RFC\ 2131, RFC\ 2132, RFC\ 2855, RFC\ 3004, RFC\ 3315,
-RFC\ 3361, RFC\ 3633, RFC\ 3396, RFC\ 3397, RFC\ 3442, RFC\ 3925, RFC\ 3927,
-RFC\ 4039, RFC\ 4075, RFC\ 4242, RFC\ 4361, RFC\ 4390, RFC\ 4702, RFC\ 4704,
-RFC\ 4861, RFC\ 4833, RFC\ 5227, RFC\ 5942, RFC\ 5969, RFC\ 6106.
+RFC\ 3361, RFC\ 3633, RFC\ 3396, RFC\ 3397, RFC\ 3442, RFC\ 3495, RFC\ 3925,
+RFC\ 3927, RFC\ 4039, RFC\ 4075, RFC\ 4242, RFC\ 4361, RFC\ 4390, RFC\ 4702,
+RFC\ 4074, RFC\ 4861, RFC\ 4833, RFC\ 5227, RFC\ 5942, RFC\ 5969, RFC\ 6106.
 .Sh AUTHORS
 .An Roy Marples Aq Mt [email protected]
 .Sh BUGS

Index: src/external/bsd/dhcpcd/dist/if-options.c
diff -u src/external/bsd/dhcpcd/dist/if-options.c:1.4 src/external/bsd/dhcpcd/dist/if-options.c:1.5
--- src/external/bsd/dhcpcd/dist/if-options.c:1.4	Fri Jan  3 22:24:41 2014
+++ src/external/bsd/dhcpcd/dist/if-options.c	Wed Jan 15 20:43:21 2014
@@ -1,9 +1,9 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: if-options.c,v 1.4 2014/01/03 22:24:41 roy Exp $");
+ __RCSID("$NetBSD: if-options.c,v 1.5 2014/01/15 20:43:21 roy Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2013 Roy Marples <[email protected]>
+ * Copyright (c) 2006-2014 Roy Marples <[email protected]>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
@@ -512,13 +512,13 @@ free_dhcp_opt_embenc(struct dhcp_opt *op
 	free(opt->var);
 
 	for (i = 0, o = opt->embopts; i < opt->embopts_len; i++, o++)
-		free(o->var);
+		free_dhcp_opt_embenc(o);
 	free(opt->embopts);
 	opt->embopts_len = 0;
 	opt->embopts = NULL;
 
 	for (i = 0, o = opt->encopts; i < opt->encopts_len; i++, o++)
-		free(o->var);
+		free_dhcp_opt_embenc(o);
 	free(opt->encopts);
 	opt->encopts_len = 0;
 	opt->encopts = NULL;
@@ -528,6 +528,8 @@ static char *
 strwhite(const char *s)
 {
 
+	if (s == NULL)
+		return NULL;
 	while (*s != ' ' && *s != '\t') {
 		if (*s == '\0')
 			return NULL;
@@ -540,6 +542,8 @@ static char *
 strskipwhite(const char *s)
 {
 
+	if (s == NULL)
+		return NULL;
 	while (*s == ' ' || *s == '\t') {
 		if (*s == '\0')
 			return NULL;
@@ -1056,10 +1060,7 @@ parse_option(struct if_options *ifo, int
 			}
 			ifo->arping = naddr;
 			ifo->arping[ifo->arping_len++] = addr.s_addr;
-			if (fp)
-				arg = strskipwhite(fp);
-			else
-				arg = NULL;
+			arg = strskipwhite(fp);
 		}
 		break;
 	case O_DESTINATION:
@@ -1086,6 +1087,7 @@ parse_option(struct if_options *ifo, int
 		if (parse_iaid(ifo->iaid, arg, sizeof(ifo->iaid)) == -1)
 			return -1;
 		ifo->options |= DHCPCD_IAID;
+		break;
 	case O_IPV6RS:
 		ifo->options |= DHCPCD_IPV6RS;
 		break;
@@ -1285,7 +1287,7 @@ parse_option(struct if_options *ifo, int
 			u = 0;
 		else {
 			fp = strwhite(arg);
-			if (!fp) {
+			if (fp == NULL) {
 				syslog(LOG_ERR, "invalid syntax: %s", arg);
 				return -1;
 			}
@@ -1297,6 +1299,10 @@ parse_option(struct if_options *ifo, int
 				return -1;
 			}
 			arg = strskipwhite(fp);
+			if (arg == NULL) {
+				syslog(LOG_ERR, "invalid syntax");
+				return -1;
+			}
 		}
 		/* type */
 		fp = strwhite(arg);
@@ -1551,10 +1557,11 @@ read_config(const char *file,
 	int skip = 0, have_profile = 0;
 #ifndef EMBEDDED_CONFIG
 	char *buf;
-	const char **e;
+	const char * const *e;
 	size_t buflen, ol;
 #endif
 #if !defined(INET) || !defined(INET6)
+	size_t i;
 	struct dhcp_opt *opt;
 #endif
 
@@ -1672,7 +1679,7 @@ read_config(const char *file,
 		dhcp6_opts_len = ifo->dhcp6_override_len;
 #else
 		for (i = 0, opt = ifo->dhcp6_override;
-		    i < ifo->dhcp_override6_len;
+		    i < ifo->dhcp6_override_len;
 		    i++, opt++)
 			free_dhcp_opt_embenc(opt);
 		free(ifo->dhcp6_override);

Index: src/external/bsd/dhcpcd/dist/ipv6nd.c
diff -u src/external/bsd/dhcpcd/dist/ipv6nd.c:1.3 src/external/bsd/dhcpcd/dist/ipv6nd.c:1.4
--- src/external/bsd/dhcpcd/dist/ipv6nd.c:1.3	Fri Jan  3 22:24:41 2014
+++ src/external/bsd/dhcpcd/dist/ipv6nd.c	Wed Jan 15 20:43:21 2014
@@ -1,9 +1,9 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: ipv6nd.c,v 1.3 2014/01/03 22:24:41 roy Exp $");
+ __RCSID("$NetBSD: ipv6nd.c,v 1.4 2014/01/15 20:43:21 roy Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2013 Roy Marples <[email protected]>
+ * Copyright (c) 2006-2014 Roy Marples <[email protected]>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
@@ -369,7 +369,7 @@ ipv6nd_sendrsprobe(void *arg)
 
 	if (ipv6_linklocal(ifp) == NULL) {
 		syslog(LOG_DEBUG,
-		    "%s: delaying Router Soliciation for LL address",
+		    "%s: delaying Router Solicitation for LL address",
 		    ifp->name);
 		ipv6_addlinklocalcallback(ifp, ipv6nd_sendrsprobe, ifp);
 		return;

Index: src/external/bsd/dhcpcd/dist/script.c
diff -u src/external/bsd/dhcpcd/dist/script.c:1.2 src/external/bsd/dhcpcd/dist/script.c:1.3
--- src/external/bsd/dhcpcd/dist/script.c:1.2	Mon Nov 18 19:55:29 2013
+++ src/external/bsd/dhcpcd/dist/script.c	Wed Jan 15 20:43:21 2014
@@ -1,9 +1,9 @@
 #include <sys/cdefs.h>
- __RCSID("$NetBSD: script.c,v 1.2 2013/11/18 19:55:29 joerg Exp $");
+ __RCSID("$NetBSD: script.c,v 1.3 2014/01/15 20:43:21 roy Exp $");
 
 /*
  * dhcpcd - DHCP client daemon
- * Copyright (c) 2006-2013 Roy Marples <[email protected]>
+ * Copyright (c) 2006-2014 Roy Marples <[email protected]>
  * All rights reserved
 
  * Redistribution and use in source and binary forms, with or without
@@ -57,7 +57,7 @@
 
 #define DEFAULT_PATH	"PATH=/usr/bin:/usr/sbin:/bin:/sbin"
 
-static const char *if_params[] = {
+static const char * const if_params[] = {
 	"interface",
 	"reason",
 	"pid",
@@ -73,7 +73,7 @@ static const char *if_params[] = {
 void
 if_printoptions(void)
 {
-	const char **p;
+	const char * const *p;
 
 	for (p = if_params; *p; p++)
 		printf(" -  %s\n", *p);

Reply via email to