MFH (r256768): don't report an error for no-op add / remove
This commit is contained in:
parent
3c6681dc2c
commit
0af7d6ff77
@ -57,7 +57,7 @@ setifgroup(const char *group_name, int d, int s, const struct afswtch *rafp)
|
||||
|
||||
if (strlcpy(ifgr.ifgr_group, group_name, IFNAMSIZ) >= IFNAMSIZ)
|
||||
errx(1, "setifgroup: group name too long");
|
||||
if (ioctl(s, SIOCAIFGROUP, (caddr_t)&ifgr) == -1)
|
||||
if (ioctl(s, SIOCAIFGROUP, (caddr_t)&ifgr) == -1 && errno != EEXIST)
|
||||
err(1," SIOCAIFGROUP");
|
||||
}
|
||||
|
||||
@ -75,7 +75,7 @@ unsetifgroup(const char *group_name, int d, int s, const struct afswtch *rafp)
|
||||
|
||||
if (strlcpy(ifgr.ifgr_group, group_name, IFNAMSIZ) >= IFNAMSIZ)
|
||||
errx(1, "unsetifgroup: group name too long");
|
||||
if (ioctl(s, SIOCDIFGROUP, (caddr_t)&ifgr) == -1)
|
||||
if (ioctl(s, SIOCDIFGROUP, (caddr_t)&ifgr) == -1 && errno != ENOENT)
|
||||
err(1, "SIOCDIFGROUP");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user