From 170d03a0c9fddf1f1a42da03139f4e14bf1449e4 Mon Sep 17 00:00:00 2001 From: yar Date: Sun, 23 May 2004 21:05:08 +0000 Subject: 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 --- sys/dev/dc/if_dc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sys/dev/dc') diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c index 01ac05a..0130b9d 100644 --- a/sys/dev/dc/if_dc.c +++ b/sys/dev/dc/if_dc.c @@ -3708,7 +3708,8 @@ dc_ioctl(struct ifnet *ifp, u_long command, caddr_t data) #endif break; case SIOCSIFCAP: - ifp->if_capenable = ifr->ifr_reqcap; + ifp->if_capenable &= ~IFCAP_POLLING; + ifp->if_capenable |= ifr->ifr_reqcap & IFCAP_POLLING; break; default: error = ether_ioctl(ifp, command, data); -- cgit v1.1