summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2020-07-03 17:42:50 +0000
committerflorian <florian@openbsd.org>2020-07-03 17:42:50 +0000
commitc99d424e0aca2fe3764cec8c101f9a8e52600374 (patch)
tree03cfb9957c7da9c613a5a7555e977687f236aa5d
parentWe need a RAMDISK kernel config as well of course. (diff)
downloadwireguard-openbsd-c99d424e0aca2fe3764cec8c101f9a8e52600374.tar.xz
wireguard-openbsd-c99d424e0aca2fe3764cec8c101f9a8e52600374.zip
Rename IN6_IFF_PRIVACY to IN6_IFF_TEMPORARY.
This is the name the other BSDs use for this, there is no reason to be different, the IPv6 RFCs call these addresses temporary, and some software in ports wants to use this as well. Most recently pointed out for firefox by landry. OK claudio, sthen
-rw-r--r--regress/sbin/ifconfig/ifaddr.c4
-rw-r--r--sbin/ifconfig/ifconfig.c4
-rw-r--r--sbin/slaacd/frontend.c8
-rw-r--r--sbin/slaacd/slaacd.c4
-rw-r--r--sys/netinet6/in6.c14
-rw-r--r--sys/netinet6/in6_var.h4
6 files changed, 19 insertions, 19 deletions
diff --git a/regress/sbin/ifconfig/ifaddr.c b/regress/sbin/ifconfig/ifaddr.c
index 31e658d8df0..ef76b1cac99 100644
--- a/regress/sbin/ifconfig/ifaddr.c
+++ b/regress/sbin/ifconfig/ifaddr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifaddr.c,v 1.3 2019/12/19 20:23:25 jmc Exp $ */
+/* $OpenBSD: ifaddr.c,v 1.4 2020/07/03 17:42:50 florian Exp $ */
/*
* This file has been copied from ifconfig and adapted to test
@@ -1382,7 +1382,7 @@ in6_alias(struct in6_ifreq *creq)
printf(" deprecated");
if (ifr6.ifr_ifru.ifru_flags6 & IN6_IFF_AUTOCONF)
printf(" autoconf");
- if (ifr6.ifr_ifru.ifru_flags6 & IN6_IFF_PRIVACY)
+ if (ifr6.ifr_ifru.ifru_flags6 & IN6_IFF_TEMPORARY)
printf(" autoconfprivacy");
}
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 58b1fca7467..cc314b7a44f 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.423 2020/06/22 02:08:43 dlg Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.424 2020/07/03 17:42:50 florian Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -3670,7 +3670,7 @@ in6_alias(struct in6_ifreq *creq)
printf(" deprecated");
if (ifr6.ifr_ifru.ifru_flags6 & IN6_IFF_AUTOCONF)
printf(" autoconf");
- if (ifr6.ifr_ifru.ifru_flags6 & IN6_IFF_PRIVACY)
+ if (ifr6.ifr_ifru.ifru_flags6 & IN6_IFF_TEMPORARY)
printf(" autoconfprivacy");
}
diff --git a/sbin/slaacd/frontend.c b/sbin/slaacd/frontend.c
index 2d4c66ab581..2adbdb0f97a 100644
--- a/sbin/slaacd/frontend.c
+++ b/sbin/slaacd/frontend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frontend.c,v 1.32 2020/04/17 06:27:32 florian Exp $ */
+/* $OpenBSD: frontend.c,v 1.33 2020/07/03 17:42:50 florian Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -587,11 +587,11 @@ update_autoconf_addresses(uint32_t if_index, char* if_name)
}
if (!(ifr6.ifr_ifru.ifru_flags6 & (IN6_IFF_AUTOCONF |
- IN6_IFF_PRIVACY)))
+ IN6_IFF_TEMPORARY)))
continue;
imsg_addrinfo.privacy = ifr6.ifr_ifru.ifru_flags6 &
- IN6_IFF_PRIVACY ? 1 : 0;
+ IN6_IFF_TEMPORARY ? 1 : 0;
memset(&ifr6, 0, sizeof(ifr6));
(void) strlcpy(ifr6.ifr_name, if_name, sizeof(ifr6.ifr_name));
@@ -659,7 +659,7 @@ flags_to_str(int flags)
(void)strlcat(buf, " deprecated", sizeof(buf));
if (flags & IN6_IFF_AUTOCONF)
(void)strlcat(buf, " autoconf", sizeof(buf));
- if (flags & IN6_IFF_PRIVACY)
+ if (flags & IN6_IFF_TEMPORARY)
(void)strlcat(buf, " autoconfprivacy", sizeof(buf));
return (buf);
diff --git a/sbin/slaacd/slaacd.c b/sbin/slaacd/slaacd.c
index e4aaaf8ccf0..f23daf0b675 100644
--- a/sbin/slaacd/slaacd.c
+++ b/sbin/slaacd/slaacd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: slaacd.c,v 1.49 2020/05/25 16:52:15 florian Exp $ */
+/* $OpenBSD: slaacd.c,v 1.50 2020/07/03 17:42:50 florian Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -695,7 +695,7 @@ configure_interface(struct imsg_configure_address *address)
in6_addreq.ifra_flags |= IN6_IFF_AUTOCONF;
if (address->privacy)
- in6_addreq.ifra_flags |= IN6_IFF_PRIVACY;
+ in6_addreq.ifra_flags |= IN6_IFF_TEMPORARY;
log_debug("%s: %s", __func__, if_name);
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index 0b32027bbfa..4aa70f7c4ab 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.c,v 1.238 2020/06/30 21:58:13 benno Exp $ */
+/* $OpenBSD: in6.c,v 1.239 2020/07/03 17:42:50 florian Exp $ */
/* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */
/*
@@ -1555,16 +1555,16 @@ in6_ifawithscope(struct ifnet *oifp, struct in6_addr *dst, u_int rdomain)
if (oifp == ifp) {
/* Do not replace temporary autoconf addresses
* with non-temporary addresses. */
- if ((ia6_best->ia6_flags & IN6_IFF_PRIVACY) &&
- !(ifatoia6(ifa)->ia6_flags &
- IN6_IFF_PRIVACY))
+ if ((ia6_best->ia6_flags & IN6_IFF_TEMPORARY)
+ && !(ifatoia6(ifa)->ia6_flags &
+ IN6_IFF_TEMPORARY))
continue;
/* Replace non-temporary autoconf addresses
* with temporary addresses. */
- if (!(ia6_best->ia6_flags & IN6_IFF_PRIVACY) &&
- (ifatoia6(ifa)->ia6_flags &
- IN6_IFF_PRIVACY))
+ if (!(ia6_best->ia6_flags & IN6_IFF_TEMPORARY)
+ && (ifatoia6(ifa)->ia6_flags &
+ IN6_IFF_TEMPORARY))
goto replace;
}
tlen = in6_matchlen(IFA_IN6(ifa), dst);
diff --git a/sys/netinet6/in6_var.h b/sys/netinet6/in6_var.h
index 3eef9507a1c..e38082c9c3c 100644
--- a/sys/netinet6/in6_var.h
+++ b/sys/netinet6/in6_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6_var.h,v 1.72 2018/05/06 15:21:25 florian Exp $ */
+/* $OpenBSD: in6_var.h,v 1.73 2020/07/03 17:42:50 florian Exp $ */
/* $KAME: in6_var.h,v 1.55 2001/02/16 12:49:45 itojun Exp $ */
/*
@@ -297,7 +297,7 @@ struct in6_aliasreq {
#define IN6_IFF_DETACHED 0x08 /* may be detached from the link */
#define IN6_IFF_DEPRECATED 0x10 /* deprecated address */
#define IN6_IFF_AUTOCONF 0x40 /* autoconfigurable address. */
-#define IN6_IFF_PRIVACY 0x80 /* RFC 4941 temporary address */
+#define IN6_IFF_TEMPORARY 0x80 /* RFC 4941 temporary address */
#ifdef _KERNEL
#define IN6_ARE_MASKED_ADDR_EQUAL(d, a, m) ( \