diff options
author | yar <yar@FreeBSD.org> | 2004-05-23 21:05:08 +0000 |
---|---|---|
committer | yar <yar@FreeBSD.org> | 2004-05-23 21:05:08 +0000 |
commit | 170d03a0c9fddf1f1a42da03139f4e14bf1449e4 (patch) | |
tree | 375592891cd6bfe9116c605a163f03aadcba537f /sys/dev/fxp/if_fxp.c | |
parent | 747b4b5ae0b8a831f8be8364825620f94dcb9ad1 (diff) | |
download | FreeBSD-src-170d03a0c9fddf1f1a42da03139f4e14bf1449e4.zip FreeBSD-src-170d03a0c9fddf1f1a42da03139f4e14bf1449e4.tar.gz |
A handler for ioctl(SIOCSIFCAP) should not alter a bit in
if_capenable unless the interface driver is actually able
to toggle the respective capability on and off.
Reviewed by: ru
Diffstat (limited to 'sys/dev/fxp/if_fxp.c')
-rw-r--r-- | sys/dev/fxp/if_fxp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 8a49329..d130c1d 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -2496,7 +2496,8 @@ fxp_ioctl(struct ifnet *ifp, u_long command, caddr_t data) break; case SIOCSIFCAP: - ifp->if_capenable = ifr->ifr_reqcap; + ifp->if_capenable &= ~IFCAP_POLLING; + ifp->if_capenable |= ifr->ifr_reqcap & IFCAP_POLLING; break; default: |