PERFORCE change 66207 for review
Sam Leffler
sam at FreeBSD.org
Wed Dec 1 12:11:39 PST 2004
http://perforce.freebsd.org/chv.cgi?CH=66207
Change 66207 by sam at 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)
More information about the p4-projects
mailing list