Module Name:    src
Committed By:   dyoung
Date:           Tue Jul 28 18:21:06 UTC 2009

Modified Files:
        src/sbin/ifconfig: parse.c

Log Message:
Both carp.c and vlan.c expect for a keyword with a KW_T_STR-type
value to put a prop_string_t into the environment, but the keyword
parser put a prop_data_t into the environment, instead.  That broke
the -vlanif and -carpdev keywords and defied developer expectations.
Let's put a prop_string_t into the environment.

Thanks to Arnaud Degroote for reporting the problem.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sbin/ifconfig/parse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sbin/ifconfig/parse.c
diff -u src/sbin/ifconfig/parse.c:1.13 src/sbin/ifconfig/parse.c:1.14
--- src/sbin/ifconfig/parse.c:1.13	Sun Jan 18 00:24:29 2009
+++ src/sbin/ifconfig/parse.c	Tue Jul 28 18:21:06 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.13 2009/01/18 00:24:29 lukem Exp $	*/
+/*	$NetBSD: parse.c,v 1.14 2009/07/28 18:21:06 dyoung Exp $	*/
 
 /*-
  * Copyright (c) 2008 David Young.  All rights reserved.
@@ -27,7 +27,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: parse.c,v 1.13 2009/01/18 00:24:29 lukem Exp $");
+__RCSID("$NetBSD: parse.c,v 1.14 2009/07/28 18:21:06 dyoung Exp $");
 #endif /* not lint */
 
 #include <err.h>
@@ -685,8 +685,7 @@
 		o = u->u_obj;
 		break;
 	case KW_T_STR:
-		o = (prop_object_t)prop_data_create_data_nocopy(u->u_str,
-		    strlen(u->u_str));
+		o = (prop_object_t)prop_string_create_cstring_nocopy(u->u_str);
 		if (o == NULL)
 			goto err;
 		break;

Reply via email to