Module Name:    src
Committed By:   thorpej
Date:           Sun Jun  7 06:02:58 UTC 2020

Modified Files:
        src/sbin/ifconfig: af_atalk.c af_inetany.c carp.c env.c ether.c
            ifconfig.c media.c parse.c pfsync.c tunnel.c

Log Message:
Update for proplib(3) API changes.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sbin/ifconfig/af_atalk.c
cvs rdiff -u -r1.18 -r1.19 src/sbin/ifconfig/af_inetany.c
cvs rdiff -u -r1.13 -r1.14 src/sbin/ifconfig/carp.c
cvs rdiff -u -r1.12 -r1.13 src/sbin/ifconfig/env.c
cvs rdiff -u -r1.8 -r1.9 src/sbin/ifconfig/ether.c src/sbin/ifconfig/media.c
cvs rdiff -u -r1.241 -r1.242 src/sbin/ifconfig/ifconfig.c
cvs rdiff -u -r1.19 -r1.20 src/sbin/ifconfig/parse.c
cvs rdiff -u -r1.2 -r1.3 src/sbin/ifconfig/pfsync.c
cvs rdiff -u -r1.21 -r1.22 src/sbin/ifconfig/tunnel.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/af_atalk.c
diff -u src/sbin/ifconfig/af_atalk.c:1.20 src/sbin/ifconfig/af_atalk.c:1.21
--- src/sbin/ifconfig/af_atalk.c:1.20	Fri Aug 16 10:33:17 2019
+++ src/sbin/ifconfig/af_atalk.c	Sun Jun  7 06:02:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: af_atalk.c,v 1.20 2019/08/16 10:33:17 msaitoh Exp $	*/
+/*	$NetBSD: af_atalk.c,v 1.21 2020/06/07 06:02:58 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: af_atalk.c,v 1.20 2019/08/16 10:33:17 msaitoh Exp $");
+__RCSID("$NetBSD: af_atalk.c,v 1.21 2020/06/07 06:02:58 thorpej Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -138,7 +138,13 @@ at_commit_address(prop_dictionary_t env,
 	if ((d0 = (prop_data_t)prop_dictionary_get(env, "address")) == NULL)
 		return;
 
-	addr = prop_data_data(d0);
+	addr = malloc(prop_data_size(d0));
+	if (addr == NULL)
+		return;
+	if (!prop_data_copy_value(d0, addr, prop_data_size(d0))) {
+		free(addr);
+		return;
+	}
 
 	sat = (struct sockaddr_at *)&addr->pfx_addr;
 
@@ -154,11 +160,13 @@ at_commit_address(prop_dictionary_t env,
 
 	/* Copy the new address to a temporary input environment */
 
-	d = prop_data_create_data_nocopy(addr, paddr_prefix_size(addr));
+	d = prop_data_create_copy(addr, paddr_prefix_size(addr));
+	free(addr);
+
 	ienv = prop_dictionary_copy_mutable(env);
 
 	if (d == NULL)
-		err(EXIT_FAILURE, "%s: prop_data_create_data", __func__);
+		err(EXIT_FAILURE, "%s: prop_data_create_copy", __func__);
 	if (ienv == NULL)
 		err(EXIT_FAILURE, "%s: prop_dictionary_copy_mutable", __func__);
 

Index: src/sbin/ifconfig/af_inetany.c
diff -u src/sbin/ifconfig/af_inetany.c:1.18 src/sbin/ifconfig/af_inetany.c:1.19
--- src/sbin/ifconfig/af_inetany.c:1.18	Fri Aug 16 10:33:17 2019
+++ src/sbin/ifconfig/af_inetany.c	Sun Jun  7 06:02:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: af_inetany.c,v 1.18 2019/08/16 10:33:17 msaitoh Exp $	*/
+/*	$NetBSD: af_inetany.c,v 1.19 2020/06/07 06:02:58 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2008 David Young.  All rights reserved.
@@ -27,7 +27,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: af_inetany.c,v 1.18 2019/08/16 10:33:17 msaitoh Exp $");
+__RCSID("$NetBSD: af_inetany.c,v 1.19 2020/06/07 06:02:58 thorpej Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -87,7 +87,7 @@ commit_address(prop_dictionary_t env, pr
 	strlcpy(param->name[1].buf, ifname, param->name[1].buflen);
 
 	if ((d = (prop_data_t)prop_dictionary_get(env, "address")) != NULL)
-		addr = prop_data_data_nocopy(d);
+		addr = prop_data_value(d);
 	else if (!prop_dictionary_get_bool(env, "alias", &alias) || alias ||
 	    param->gifaddr.cmd == 0)
 		return;
@@ -99,17 +99,17 @@ commit_address(prop_dictionary_t env, pr
 		return;
 
 	if ((d = (prop_data_t)prop_dictionary_get(env, "dst")) != NULL)
-		dst = prop_data_data_nocopy(d);
+		dst = prop_data_value(d);
 	else
 		dst = NULL;
 
 	if ((d = (prop_data_t)prop_dictionary_get(env, "netmask")) != NULL)
-		mask = prop_data_data_nocopy(d);
+		mask = prop_data_value(d);
 	else
 		mask = NULL;
 
 	if ((d = (prop_data_t)prop_dictionary_get(env, "broadcast")) != NULL)
-		brd = prop_data_data_nocopy(d);
+		brd = prop_data_value(d);
 	else
 		brd = NULL;
 

Index: src/sbin/ifconfig/carp.c
diff -u src/sbin/ifconfig/carp.c:1.13 src/sbin/ifconfig/carp.c:1.14
--- src/sbin/ifconfig/carp.c:1.13	Fri Sep 11 23:22:28 2009
+++ src/sbin/ifconfig/carp.c	Sun Jun  7 06:02:58 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: carp.c,v 1.13 2009/09/11 23:22:28 dyoung Exp $ */
+/* $NetBSD: carp.c,v 1.14 2020/06/07 06:02:58 thorpej Exp $ */
 
 /*
  * Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -28,7 +28,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: carp.c,v 1.13 2009/09/11 23:22:28 dyoung Exp $");
+__RCSID("$NetBSD: carp.c,v 1.14 2020/06/07 06:02:58 thorpej Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -167,7 +167,7 @@ setcarp_passwd(prop_dictionary_t env, pr
 
 	memset(carpr.carpr_key, 0, sizeof(carpr.carpr_key));
 	/* XXX Should hash the password into the key here, perhaps? */
-	strlcpy((char *)carpr.carpr_key, prop_data_data_nocopy(data),
+	strlcpy((char *)carpr.carpr_key, prop_data_value(data),
 	    MIN(CARP_KEY_LEN, prop_data_size(data)));
 
 	carp_set(env, &carpr);
@@ -267,7 +267,7 @@ setcarpdev(prop_dictionary_t env, prop_d
 
 	carp_get(env, &carpr);
 
-	strlcpy(carpr.carpr_carpdev, prop_string_cstring_nocopy(s),
+	strlcpy(carpr.carpr_carpdev, prop_string_value(s),
 	    sizeof(carpr.carpr_carpdev));
 
 	carp_set(env, &carpr);

Index: src/sbin/ifconfig/env.c
diff -u src/sbin/ifconfig/env.c:1.12 src/sbin/ifconfig/env.c:1.13
--- src/sbin/ifconfig/env.c:1.12	Fri Aug 16 10:33:17 2019
+++ src/sbin/ifconfig/env.c	Sun Jun  7 06:02:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: env.c,v 1.12 2019/08/16 10:33:17 msaitoh Exp $	*/
+/*	$NetBSD: env.c,v 1.13 2020/06/07 06:02:58 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2008 David Young.  All rights reserved.
@@ -27,7 +27,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: env.c,v 1.12 2019/08/16 10:33:17 msaitoh Exp $");
+__RCSID("$NetBSD: env.c,v 1.13 2020/06/07 06:02:58 thorpej Exp $");
 #endif /* not lint */
 
 #include <errno.h>
@@ -60,7 +60,7 @@ prop_dictionary_augment(prop_dictionary_
 
 	while (i != NULL && (ko = prop_object_iterator_next(i)) != NULL) {
 		k = (prop_dictionary_keysym_t)ko;
-		key = prop_dictionary_keysym_cstring_nocopy(k);
+		key = prop_dictionary_keysym_value(k);
 		o = prop_dictionary_get_keysym(top, k);
 		if (o == NULL || !prop_dictionary_set(d, key, o)) {
 			prop_object_release((prop_object_t)d);
@@ -141,7 +141,7 @@ getargdata(prop_dictionary_t env, const 
 		errno = ENAMETOOLONG;
 		return -1;
 	}
-	memcpy(buf, prop_data_data_nocopy(data), datalen);
+	memcpy(buf, prop_data_value(data), datalen);
 	memset(buf + datalen, 0, buflen - datalen);
 	return datalen;
 }
@@ -162,7 +162,7 @@ getargstr(prop_dictionary_t env, const c
 		errno = ENAMETOOLONG;
 		return -1;
 	}
-	memcpy(buf, prop_data_data_nocopy(data), datalen);
+	memcpy(buf, prop_data_value(data), datalen);
 	memset(buf + datalen, 0, buflen - datalen);
 	return datalen;
 }

Index: src/sbin/ifconfig/ether.c
diff -u src/sbin/ifconfig/ether.c:1.8 src/sbin/ifconfig/ether.c:1.9
--- src/sbin/ifconfig/ether.c:1.8	Thu Jan  2 23:02:19 2020
+++ src/sbin/ifconfig/ether.c	Sun Jun  7 06:02:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ether.c,v 1.8 2020/01/02 23:02:19 ryo Exp $	*/
+/*	$NetBSD: ether.c,v 1.9 2020/06/07 06:02:58 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: ether.c,v 1.8 2020/01/02 23:02:19 ryo Exp $");
+__RCSID("$NetBSD: ether.c,v 1.9 2020/06/07 06:02:58 thorpej Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -85,7 +85,7 @@ do_setethercaps(prop_dictionary_t env)
 
 	assert(sizeof(eccr) == prop_data_size(d));
 
-	memcpy(&eccr, prop_data_data_nocopy(d), sizeof(eccr));
+	memcpy(&eccr, prop_data_value(d), sizeof(eccr));
 	if (direct_ioctl(env, SIOCSETHERCAP, &eccr) == -1)
 		err(EXIT_FAILURE, "SIOCSETHERCAP");
 }
@@ -102,7 +102,7 @@ getethercaps(prop_dictionary_t env, prop
 	capdata = (prop_data_t)prop_dictionary_get(env, "ethercaps");
 
 	if (capdata != NULL) {
-		tmpeccr = prop_data_data_nocopy(capdata);
+		tmpeccr = prop_data_value(capdata);
 		*oeccr = *tmpeccr;
 		return 0;
 	}
@@ -110,7 +110,7 @@ getethercaps(prop_dictionary_t env, prop
 	(void)direct_ioctl(env, SIOCGETHERCAP, &eccr);
 	*oeccr = eccr;
 
-	capdata = prop_data_create_data(&eccr, sizeof(eccr));
+	capdata = prop_data_create_copy(&eccr, sizeof(eccr));
 
 	rc = prop_dictionary_set(oenv, "ethercaps", capdata);
 
@@ -139,7 +139,7 @@ setethercaps(prop_dictionary_t env, prop
 	} else
 		eccr.eccr_capenable |= ethercap;
 
-	if ((capdata = prop_data_create_data(&eccr, sizeof(eccr))) == NULL)
+	if ((capdata = prop_data_create_copy(&eccr, sizeof(eccr))) == NULL)
 		return -1;
 
 	rc = prop_dictionary_set(oenv, "ethercaps", capdata);
Index: src/sbin/ifconfig/media.c
diff -u src/sbin/ifconfig/media.c:1.8 src/sbin/ifconfig/media.c:1.9
--- src/sbin/ifconfig/media.c:1.8	Mon Apr 22 10:44:55 2019
+++ src/sbin/ifconfig/media.c	Sun Jun  7 06:02:58 2020
@@ -1,6 +1,6 @@
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: media.c,v 1.8 2019/04/22 10:44:55 msaitoh Exp $");
+__RCSID("$NetBSD: media.c,v 1.9 2020/06/07 06:02:58 thorpej Exp $");
 #endif /* not lint */
 
 #include <assert.h>
@@ -188,7 +188,7 @@ setmedia(prop_dictionary_t env, prop_dic
 	type = IFM_TYPE(media_current);
 	inst = IFM_INST(media_current);
 
-	val = strndup(prop_data_data_nocopy(data), prop_data_size(data));
+	val = strndup(prop_data_value(data), prop_data_size(data));
 	if (val == NULL)
 		return -1;
 
@@ -219,7 +219,7 @@ setmediaopt(prop_dictionary_t env, prop_
 	/* Can only issue `mediaopt' once. */
 	/* Can't issue `mediaopt' if `instance' has already been issued. */
 
-	val = strndup(prop_data_data_nocopy(data), prop_data_size(data));
+	val = strndup(prop_data_value(data), prop_data_size(data));
 	if (val == NULL)
 		return -1;
 
@@ -246,7 +246,7 @@ unsetmediaopt(prop_dictionary_t env, pro
 		return -1;
 	}
 
-	val = strndup(prop_data_data_nocopy(data), prop_data_size(data));
+	val = strndup(prop_data_value(data), prop_data_size(data));
 	if (val == NULL)
 		return -1;
 
@@ -306,7 +306,7 @@ setmediamode(prop_dictionary_t env, prop
 	options = IFM_OPTIONS(media_current);
 	inst = IFM_INST(media_current);
 
-	val = strndup(prop_data_data_nocopy(data), prop_data_size(data));
+	val = strndup(prop_data_value(data), prop_data_size(data));
 	if (val == NULL)
 		return -1;
 

Index: src/sbin/ifconfig/ifconfig.c
diff -u src/sbin/ifconfig/ifconfig.c:1.241 src/sbin/ifconfig/ifconfig.c:1.242
--- src/sbin/ifconfig/ifconfig.c:1.241	Thu Jan  2 23:02:19 2020
+++ src/sbin/ifconfig/ifconfig.c	Sun Jun  7 06:02:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: ifconfig.c,v 1.241 2020/01/02 23:02:19 ryo Exp $	*/
+/*	$NetBSD: ifconfig.c,v 1.242 2020/06/07 06:02:58 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 2000 The NetBSD Foundation, Inc.
@@ -63,7 +63,7 @@
 #ifndef lint
 __COPYRIGHT("@(#) Copyright (c) 1983, 1993\
  The Regents of the University of California.  All rights reserved.");
-__RCSID("$NetBSD: ifconfig.c,v 1.241 2020/01/02 23:02:19 ryo Exp $");
+__RCSID("$NetBSD: ifconfig.c,v 1.242 2020/06/07 06:02:58 thorpej Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -614,7 +614,7 @@ do_setifcaps(prop_dictionary_t env)
 
 	assert(sizeof(ifcr) == prop_data_size(d));
 
-	memcpy(&ifcr, prop_data_data_nocopy(d), sizeof(ifcr));
+	memcpy(&ifcr, prop_data_value(d), sizeof(ifcr));
 	if (direct_ioctl(env, SIOCSIFCAP, &ifcr) == -1)
 		err(EXIT_FAILURE, "SIOCSIFCAP");
 }
@@ -884,7 +884,7 @@ printall(const char *ifname, prop_dictio
 			sdl = ifa->ifa_addr;
 		if (p && strcmp(p, ifa->ifa_name) == 0)
 			continue;
-		if (!prop_dictionary_set_cstring(env, "if", ifa->ifa_name))
+		if (!prop_dictionary_set_string(env, "if", ifa->ifa_name))
 			continue;
 		p = ifa->ifa_name;
 
@@ -990,7 +990,7 @@ setifaddr(prop_dictionary_t env, prop_di
 
 	d = (prop_data_t)prop_dictionary_get(env, "address");
 	assert(d != NULL);
-	pfx0 = prop_data_data_nocopy(d);
+	pfx0 = prop_data_value(d);
 
 	if (pfx0->pfx_len >= 0) {
 		pfx = prefixlen_to_mask(af, pfx0->pfx_len);
@@ -1107,7 +1107,7 @@ getifcaps(prop_dictionary_t env, prop_di
 	capdata = (prop_data_t)prop_dictionary_get(env, "ifcaps");
 
 	if (capdata != NULL) {
-		tmpifcr = prop_data_data_nocopy(capdata);
+		tmpifcr = prop_data_value(capdata);
 		*oifcr = *tmpifcr;
 		return 0;
 	}
@@ -1115,7 +1115,7 @@ getifcaps(prop_dictionary_t env, prop_di
 	(void)direct_ioctl(env, SIOCGIFCAP, &ifcr);
 	*oifcr = ifcr;
 
-	capdata = prop_data_create_data(&ifcr, sizeof(ifcr));
+	capdata = prop_data_create_copy(&ifcr, sizeof(ifcr));
 
 	rc = prop_dictionary_set(oenv, "ifcaps", capdata);
 
@@ -1144,7 +1144,7 @@ setifcaps(prop_dictionary_t env, prop_di
 	} else
 		ifcr.ifcr_capenable |= ifcap;
 
-	if ((capdata = prop_data_create_data(&ifcr, sizeof(ifcr))) == NULL)
+	if ((capdata = prop_data_create_copy(&ifcr, sizeof(ifcr))) == NULL)
 		return -1;
 
 	rc = prop_dictionary_set(oenv, "ifcaps", capdata);
@@ -1185,7 +1185,7 @@ do_setifpreference(prop_dictionary_t env
 	d = (prop_data_t)prop_dictionary_get(env, "address");
 	assert(d != NULL);
 
-	pfx = prop_data_data_nocopy(d);
+	pfx = prop_data_value(d);
 
 	memcpy(&ifap.ifap_addr, &pfx->pfx_addr,
 	    MIN(sizeof(ifap.ifap_addr), pfx->pfx_addr.sa_len));
@@ -1422,9 +1422,9 @@ setifprefixlen(prop_dictionary_t env, pr
 	if (pfx == NULL)
 		err(EXIT_FAILURE, "prefixlen_to_mask");
 
-	d = prop_data_create_data(pfx, paddr_prefix_size(pfx));
+	d = prop_data_create_copy(pfx, paddr_prefix_size(pfx));
 	if (d == NULL)
-		err(EXIT_FAILURE, "%s: prop_data_create_data", __func__);
+		err(EXIT_FAILURE, "%s: prop_data_create_copy", __func__);
 
 	if (!prop_dictionary_set(oenv, "netmask", (prop_object_t)d))
 		err(EXIT_FAILURE, "%s: prop_dictionary_set", __func__);

Index: src/sbin/ifconfig/parse.c
diff -u src/sbin/ifconfig/parse.c:1.19 src/sbin/ifconfig/parse.c:1.20
--- src/sbin/ifconfig/parse.c:1.19	Fri Aug 16 10:33:17 2019
+++ src/sbin/ifconfig/parse.c	Sun Jun  7 06:02:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: parse.c,v 1.19 2019/08/16 10:33:17 msaitoh Exp $	*/
+/*	$NetBSD: parse.c,v 1.20 2020/06/07 06:02:58 thorpej 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.19 2019/08/16 10:33:17 msaitoh Exp $");
+__RCSID("$NetBSD: parse.c,v 1.20 2020/06/07 06:02:58 thorpej Exp $");
 #endif /* not lint */
 
 #include <err.h>
@@ -163,7 +163,7 @@ pstr_match(const struct parser *p, const
 		return -1;
 	}
 
-	o = (prop_object_t)prop_data_create_data(buf, len);
+	o = (prop_object_t)prop_data_create_copy(buf, len);
 
 	if (o == NULL) {
 		errno = ENOMEM;
@@ -208,7 +208,7 @@ pinteger_match(const struct parser *p, c
 		return -1;
 	}
 
-	o = (prop_object_t)prop_number_create_integer(val);
+	o = (prop_object_t)prop_number_create_signed(val);
 
 	if (o == NULL) {
 		errno = ENOMEM;
@@ -446,7 +446,7 @@ paddr_match(const struct parser *p, cons
 	if (result != NULL)
 		freeaddrinfo(result);
 
-	o = (prop_object_t)prop_data_create_data(pfx, len);
+	o = (prop_object_t)prop_data_create_copy(pfx, len);
 
 	free(pfx);
 
@@ -467,11 +467,11 @@ paddr_match(const struct parser *p, cons
 
 		masklen = paddr_prefix_size(mask);
 
-		d = prop_data_create_data(mask, masklen);
+		d = prop_data_create_copy(mask, masklen);
 		free(mask);
 
 		if (d == NULL) {
-			err(EXIT_FAILURE, "%s: prop_data_create_data",
+			err(EXIT_FAILURE, "%s: prop_data_create_copy",
 			    __func__);
 			return -1;
 		}
@@ -527,7 +527,7 @@ piface_match(const struct parser *p, con
 		return -1;
 	}
 
-	if ((o = (prop_object_t)prop_string_create_cstring(arg)) == NULL) {
+	if ((o = (prop_object_t)prop_string_create_copy(arg)) == NULL) {
 		errno = ENOMEM;
 		return -1;
 	}
@@ -666,13 +666,12 @@ pkw_match(const struct parser *p, const 
 			goto err;
 		break;
 	case KW_T_INT:
-		o = (prop_object_t)prop_number_create_integer(u->u_sint);
+		o = (prop_object_t)prop_number_create_signed(u->u_sint);
 		if (o == NULL)
 			goto err;
 		break;
 	case KW_T_UINT:
-		o = (prop_object_t)prop_number_create_unsigned_integer(
-		    u->u_uint);
+		o = (prop_object_t)prop_number_create_unsigned(u->u_uint);
 		if (o == NULL)
 			goto err;
 		break;
@@ -680,7 +679,7 @@ pkw_match(const struct parser *p, const 
 		o = u->u_obj;
 		break;
 	case KW_T_STR:
-		o = (prop_object_t)prop_string_create_cstring_nocopy(u->u_str);
+		o = (prop_object_t)prop_string_create_nocopy(u->u_str);
 		if (o == NULL)
 			goto err;
 		break;

Index: src/sbin/ifconfig/pfsync.c
diff -u src/sbin/ifconfig/pfsync.c:1.2 src/sbin/ifconfig/pfsync.c:1.3
--- src/sbin/ifconfig/pfsync.c:1.2	Fri Aug 16 10:33:17 2019
+++ src/sbin/ifconfig/pfsync.c	Sun Jun  7 06:02:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pfsync.c,v 1.2 2019/08/16 10:33:17 msaitoh Exp $	*/
+/*	$NetBSD: pfsync.c,v 1.3 2020/06/07 06:02:58 thorpej Exp $	*/
 /*-
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -27,7 +27,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: pfsync.c,v 1.2 2019/08/16 10:33:17 msaitoh Exp $");
+__RCSID("$NetBSD: pfsync.c,v 1.3 2020/06/07 06:02:58 thorpej Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -185,7 +185,7 @@ setpfsync_peer(prop_dictionary_t env, pr
 
 	pfsync_get(env, &pfsyncr);
 
-	peerpfx = prop_data_data_nocopy(data);
+	peerpfx = prop_data_value(data);
 
 	if (peerpfx != NULL) {
 		// Only AF_INET is supported for now

Index: src/sbin/ifconfig/tunnel.c
diff -u src/sbin/ifconfig/tunnel.c:1.21 src/sbin/ifconfig/tunnel.c:1.22
--- src/sbin/ifconfig/tunnel.c:1.21	Fri Aug 16 10:33:17 2019
+++ src/sbin/ifconfig/tunnel.c	Sun Jun  7 06:02:58 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: tunnel.c,v 1.21 2019/08/16 10:33:17 msaitoh Exp $	*/
+/*	$NetBSD: tunnel.c,v 1.22 2020/06/07 06:02:58 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1983, 1993
@@ -31,7 +31,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: tunnel.c,v 1.21 2019/08/16 10:33:17 msaitoh Exp $");
+__RCSID("$NetBSD: tunnel.c,v 1.22 2020/06/07 06:02:58 thorpej Exp $");
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -98,8 +98,8 @@ settunnel(prop_dictionary_t env, prop_di
 		return -1;
 	}
 
-	srcpfx = prop_data_data_nocopy(srcdata);
-	dstpfx = prop_data_data_nocopy(dstdata);
+	srcpfx = prop_data_value(srcdata);
+	dstpfx = prop_data_value(dstdata);
 
 	if (srcpfx->pfx_addr.sa_family != dstpfx->pfx_addr.sa_family)
 		errx(EXIT_FAILURE,

Reply via email to