summaryrefslogtreecommitdiff
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2014-06-23 18:44:44 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2014-06-23 18:44:44 +0000
commit28618f5c66ba15d00c1790cbe7316c982817a200 (patch)
tree58ac31d777b982f8c95c240c5235d20834f3a16b /sbin/ifconfig
parentc91bcfb1160e416e569702a0dd46d48cf9ca91cf (diff)
make "ifconfig <if> inet6 eui64" reset the NOINET6 flag
(unconditionally), so a link-local will be assigned if there isn't one yet. ok krw benno todd sthen
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifconfig.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 764db00c75b..29c706a19cc 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.283 2014/05/12 08:47:37 beck Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.284 2014/06/23 18:44:43 henning Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -411,7 +411,7 @@ const struct cmd {
{ "flowdst", NEXTARG, 0, setpflow_receiver },
{ "-flowdst", 1, 0, unsetpflow_receiver },
{ "pflowproto", NEXTARG, 0, setpflowproto },
- { "-inet6", IFXF_NOINET6, 0, setifxflags } ,
+ { "-inet6", IFXF_NOINET6, 0, setifxflags },
{ "keepalive", NEXTARG2, 0, NULL, setkeepalive },
{ "-keepalive", 1, 0, unsetkeepalive },
{ "add", NEXTARG, 0, bridge_add },
@@ -1312,6 +1312,7 @@ setia6eui64(const char *cmd, int val)
if (afp->af_af != AF_INET6)
errx(1, "%s not allowed for the AF", cmd);
+ setifxflags("inet6", -IFXF_NOINET6);
in6 = (struct in6_addr *)&in6_addreq.ifra_addr.sin6_addr;
if (memcmp(&in6addr_any.s6_addr[8], &in6->s6_addr[8], 8) != 0)
errx(1, "interface index is already filled");