summaryrefslogtreecommitdiff
path: root/sbin/ifconfig/ifconfig.c
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2021-03-11 19:53:41 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2021-03-11 19:53:41 +0000
commit1e53b7ec5dda2310c84e5e2f1d9cf9490740998f (patch)
tree1bf41b3822abbd903a5699affddcfeeb6280293e /sbin/ifconfig/ifconfig.c
parentedc0adae44ef72d1efee0430764604ba67e5a113 (diff)
When RFC 8981 obsoleted RFC 4941 the terminology changed from
"privacy extensions" to "temporary address extensions" Change ifconfig(8) to output temporary after temporary addresses and add "temporary" option which is an alias for autoconfprivacy for now. Also make AUTOCONF6TEMP a positiv flag that is set by default. Previously the negative flag "INET6_NOPRIVACY" was set when privacy addresses were disabled. This makes the flags output less ugly and will allow us to disable autoconf addresses while having temporary addresses enabled in the future. More work is needed in slaacd. input benno, jmc, deraadt previous verison OK benno OK jmc, kn
Diffstat (limited to 'sbin/ifconfig/ifconfig.c')
-rw-r--r--sbin/ifconfig/ifconfig.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 859ee4a3870..5a274d1e3d7 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.435 2021/03/04 07:46:26 jsg Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.436 2021/03/11 19:53:39 florian Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -464,8 +464,10 @@ const struct cmd {
{ "pltime", NEXTARG, 0, setia6pltime },
{ "vltime", NEXTARG, 0, setia6vltime },
{ "eui64", 0, 0, setia6eui64 },
- { "autoconfprivacy", -IFXF_INET6_NOPRIVACY, 0, setifxflags },
- { "-autoconfprivacy", IFXF_INET6_NOPRIVACY, 0, setifxflags },
+ { "autoconfprivacy", IFXF_AUTOCONF6TEMP, 0, setifxflags },
+ { "-autoconfprivacy", -IFXF_AUTOCONF6TEMP, 0, setifxflags },
+ { "temporary", IFXF_AUTOCONF6TEMP, 0, setifxflags },
+ { "-temporary", -IFXF_AUTOCONF6TEMP, 0, setifxflags },
{ "soii", -IFXF_INET6_NOSOII, 0, setifxflags },
{ "-soii", IFXF_INET6_NOSOII, 0, setifxflags },
{ "monitor", IFXF_MONITOR, 0, setifxflags },
@@ -676,7 +678,7 @@ const struct cmd {
"\024\1UP\2BROADCAST\3DEBUG\4LOOPBACK\5POINTOPOINT\6STATICARP" \
"\7RUNNING\10NOARP\11PROMISC\12ALLMULTI\13OACTIVE\14SIMPLEX" \
"\15LINK0\16LINK1\17LINK2\20MULTICAST" \
- "\23INET6_NOPRIVACY\24MPLS\25WOL\26AUTOCONF6\27INET6_NOSOII" \
+ "\23AUTOCONF6TEMP\24MPLS\25WOL\26AUTOCONF6\27INET6_NOSOII" \
"\30AUTOCONF4" "\31MONITOR"
int getinfo(struct ifreq *, int);
@@ -1577,7 +1579,8 @@ setautoconf(const char *cmd, int val)
setifxflags("inet", val * IFXF_AUTOCONF4);
break;
case AF_INET6:
- setifxflags("inet6", val * IFXF_AUTOCONF6);
+ setifxflags("inet6", val * (IFXF_AUTOCONF6 |
+ IFXF_AUTOCONF6TEMP));
break;
default:
errx(1, "autoconf not allowed for this address family");
@@ -3676,7 +3679,7 @@ in6_alias(struct in6_ifreq *creq)
if (ifr6.ifr_ifru.ifru_flags6 & IN6_IFF_AUTOCONF)
printf(" autoconf");
if (ifr6.ifr_ifru.ifru_flags6 & IN6_IFF_TEMPORARY)
- printf(" autoconfprivacy");
+ printf(" temporary");
}
if (scopeid)