Date: Wed, 1 Dec 2004 20:11:38 GMT From: Sam Leffler <sam@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 66207 for review Message-ID: <200412012011.iB1KBcTU009292@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=66207 Change 66207 by sam@sam_ebb on 2004/12/01 20:11:25 o don't require the interface be up to do a SETIF ioctl o check IFF_UP on writes Affected files ... .. //depot/projects/wifi/sys/net/bpf.c#2 edit Differences ... ==== //depot/projects/wifi/sys/net/bpf.c#2 (text+ko) ==== @@ -564,6 +564,9 @@ ifp = d->bd_bif->bif_ifp; + if ((ifp->if_flags & IFF_UP) == 0) + return (ENETDOWN); + if (uio->uio_resid == 0) return (0); @@ -1006,14 +1009,10 @@ mtx_unlock(&bpf_mtx); /* * We found the requested interface. - * If it's not up, return an error. * Allocate the packet buffers if we need to. * If we're already attached to requested interface, * just flush the buffer. */ - if ((ifp->if_flags & IFF_UP) == 0) - return (ENETDOWN); - if (d->bd_sbuf == NULL) { error = bpf_allocbufs(d); if (error != 0)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200412012011.iB1KBcTU009292>
