summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorandre <andre@FreeBSD.org>2006-09-20 15:38:37 +0000
committerandre <andre@FreeBSD.org>2006-09-20 15:38:37 +0000
commit4619fa3a870ed00ddba414027d735e9ebb3eb31b (patch)
treeb4c09f094684bf14d1b0189b9f0164245391de1f /sbin/ifconfig
parent41fdf2d4816062238e18e4acbe6cb02bafa47152 (diff)
downloadFreeBSD-src-4619fa3a870ed00ddba414027d735e9ebb3eb31b.zip
FreeBSD-src-4619fa3a870ed00ddba414027d735e9ebb3eb31b.tar.gz
In setifcap() only set/unset those capabilities the interface actually
supports.
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifconfig.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 199cddf..2210a2f 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -733,6 +733,7 @@ setifcap(const char *vname, int value, int s, const struct afswtch *afp)
flags &= ~value;
} else
flags |= value;
+ flags &= ifr.ifr_reqcap;
ifr.ifr_reqcap = flags;
if (ioctl(s, SIOCSIFCAP, (caddr_t)&ifr) < 0)
Perror(vname);
OpenPOWER on IntegriCloud