summaryrefslogtreecommitdiff
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-12-22 17:48:50 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-12-22 17:48:50 +0000
commitf9691be43cc156e74654c1792401d51aedb0c3d3 (patch)
tree9956e78534fca0a3c177fd0a6f237505b9885cef /sbin/ifconfig
parent18e48f50a5aa3148be5ecd5b307a6940eb8b1caa (diff)
re-adding a group that exists is not an error
ok claudio
Diffstat (limited to 'sbin/ifconfig')
-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 */