summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2009-12-22 17:48:49 +0000
committerderaadt <deraadt@openbsd.org>2009-12-22 17:48:49 +0000
commit7365ffc00560603480bdfb7ddb195237fa374ffd (patch)
treefeea273950358e72df31b8a467f0fba0f1eb62be
parentImplement log_in6addr_scope() yet another function doing the same thing (diff)
downloadwireguard-openbsd-7365ffc00560603480bdfb7ddb195237fa374ffd.tar.xz
wireguard-openbsd-7365ffc00560603480bdfb7ddb195237fa374ffd.zip
re-adding a group that exists is not an error
ok claudio
-rw-r--r--sbin/ifconfig/ifconfig.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index b0c12e462f7..4750dbf3162 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.226 2009/12/14 17:22:58 deraadt Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.227 2009/12/22 17:48:49 deraadt Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -1333,8 +1333,10 @@ setifgroup(const char *group_name, int dummy)
if (strlcpy(ifgr.ifgr_group, group_name, IFNAMSIZ) >= IFNAMSIZ)
errx(1, "setifgroup: group name too long");
- if (ioctl(s, SIOCAIFGROUP, (caddr_t)&ifgr) == -1)
- err(1," SIOCAIFGROUP");
+ if (ioctl(s, SIOCAIFGROUP, (caddr_t)&ifgr) == -1) {
+ if (errno != EEXIST)
+ err(1," SIOCAIFGROUP");
+ }
}
/* ARGSUSED */