if_iso88025subr.c (148883) | if_iso88025subr.c (148887) |
---|---|
1/*- 2 * Copyright (c) 1998, Larry Lile 3 * All rights reserved. 4 * 5 * For latest sources and information on this driver, please 6 * go to http://anarchy.stdio.com. 7 * 8 * Questions, comments or suggestions should be directed to --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * | 1/*- 2 * Copyright (c) 1998, Larry Lile 3 * All rights reserved. 4 * 5 * For latest sources and information on this driver, please 6 * go to http://anarchy.stdio.com. 7 * 8 * Questions, comments or suggestions should be directed to --- 16 unchanged lines hidden (view full) --- 25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * |
33 * $FreeBSD: head/sys/net/if_iso88025subr.c 148883 2005-08-09 08:39:56Z glebius $ | 33 * $FreeBSD: head/sys/net/if_iso88025subr.c 148887 2005-08-09 10:20:02Z rwatson $ |
34 * 35 */ 36 37/* 38 * 39 * General ISO 802.5 (Token Ring) support routines 40 * 41 */ --- 206 unchanged lines hidden (view full) --- 248#ifdef MAC 249 error = mac_check_ifnet_transmit(ifp, m); 250 if (error) 251 senderr(error); 252#endif 253 254 if (ifp->if_flags & IFF_MONITOR) 255 senderr(ENETDOWN); | 34 * 35 */ 36 37/* 38 * 39 * General ISO 802.5 (Token Ring) support routines 40 * 41 */ --- 206 unchanged lines hidden (view full) --- 248#ifdef MAC 249 error = mac_check_ifnet_transmit(ifp, m); 250 if (error) 251 senderr(error); 252#endif 253 254 if (ifp->if_flags & IFF_MONITOR) 255 senderr(ENETDOWN); |
256 if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) | 256 if (!((ifp->if_flags & IFF_UP) && 257 (ifp->if_drv_flags & IFF_DRV_RUNNING))) |
257 senderr(ENETDOWN); 258 getmicrotime(&ifp->if_lastchange); 259 260 /* Calculate routing info length based on arp table entry */ 261 /* XXX any better way to do this ? */ 262 error = rt_check(&rt, &rt0, dst); 263 if (error) 264 goto bad; --- 214 unchanged lines hidden (view full) --- 479 goto dropanyway; 480 } 481 th = mtod(m, struct iso88025_header *); 482 m->m_pkthdr.header = (void *)th; 483 484 /* 485 * Discard packet if interface is not up. 486 */ | 258 senderr(ENETDOWN); 259 getmicrotime(&ifp->if_lastchange); 260 261 /* Calculate routing info length based on arp table entry */ 262 /* XXX any better way to do this ? */ 263 error = rt_check(&rt, &rt0, dst); 264 if (error) 265 goto bad; --- 214 unchanged lines hidden (view full) --- 480 goto dropanyway; 481 } 482 th = mtod(m, struct iso88025_header *); 483 m->m_pkthdr.header = (void *)th; 484 485 /* 486 * Discard packet if interface is not up. 487 */ |
487 if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) | 488 if (!((ifp->if_flags & IFF_UP) && 489 (ifp->if_drv_flags & IFF_DRV_RUNNING))) |
488 goto dropanyway; 489 490 /* 491 * Give bpf a chance at the packet. 492 */ 493 BPF_MTAP(ifp, m); 494 495 /* --- 330 unchanged lines hidden --- | 490 goto dropanyway; 491 492 /* 493 * Give bpf a chance at the packet. 494 */ 495 BPF_MTAP(ifp, m); 496 497 /* --- 330 unchanged lines hidden --- |