In setifcap() only set/unset those capabilities the interface actually
supports.
This commit is contained in:
parent
f50c4fd817
commit
6b92a00668
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=162469
@ -733,6 +733,7 @@ setifcap(const char *vname, int value, int s, const struct afswtch *afp)
|
|||||||
flags &= ~value;
|
flags &= ~value;
|
||||||
} else
|
} else
|
||||||
flags |= value;
|
flags |= value;
|
||||||
|
flags &= ifr.ifr_reqcap;
|
||||||
ifr.ifr_reqcap = flags;
|
ifr.ifr_reqcap = flags;
|
||||||
if (ioctl(s, SIOCSIFCAP, (caddr_t)&ifr) < 0)
|
if (ioctl(s, SIOCSIFCAP, (caddr_t)&ifr) < 0)
|
||||||
Perror(vname);
|
Perror(vname);
|
||||||
|
Loading…
Reference in New Issue
Block a user