Deleted Added
full compact
if_fddisubr.c (148641) if_fddisubr.c (148887)
1/*-
2 * Copyright (c) 1995, 1996
3 * Matt Thomas <matt@3am-software.com>. All rights reserved.
4 * Copyright (c) 1982, 1989, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 19 unchanged lines hidden (view full) ---

28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp
1/*-
2 * Copyright (c) 1995, 1996
3 * Matt Thomas <matt@3am-software.com>. All rights reserved.
4 * Copyright (c) 1982, 1989, 1993
5 * The Regents of the University of California. All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 19 unchanged lines hidden (view full) ---

28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * from: if_ethersubr.c,v 1.5 1994/12/13 22:31:45 wollman Exp
36 * $FreeBSD: head/sys/net/if_fddisubr.c 148641 2005-08-02 17:52:52Z rwatson $
36 * $FreeBSD: head/sys/net/if_fddisubr.c 148887 2005-08-09 10:20:02Z rwatson $
37 */
38
39#include "opt_atalk.h"
40#include "opt_inet.h"
41#include "opt_inet6.h"
42#include "opt_ipx.h"
43#include "opt_mac.h"
44

--- 77 unchanged lines hidden (view full) ---

122#ifdef MAC
123 error = mac_check_ifnet_transmit(ifp, m);
124 if (error)
125 senderr(error);
126#endif
127
128 if (ifp->if_flags & IFF_MONITOR)
129 senderr(ENETDOWN);
37 */
38
39#include "opt_atalk.h"
40#include "opt_inet.h"
41#include "opt_inet6.h"
42#include "opt_ipx.h"
43#include "opt_mac.h"
44

--- 77 unchanged lines hidden (view full) ---

122#ifdef MAC
123 error = mac_check_ifnet_transmit(ifp, m);
124 if (error)
125 senderr(error);
126#endif
127
128 if (ifp->if_flags & IFF_MONITOR)
129 senderr(ENETDOWN);
130 if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
130 if (!((ifp->if_flags & IFF_UP) &&
131 (ifp->if_drv_flags & IFF_DRV_RUNNING)))
131 senderr(ENETDOWN);
132 getmicrotime(&ifp->if_lastchange);
133
134 switch (dst->sa_family) {
135#ifdef INET
136 case AF_INET: {
137 error = arpresolve(ifp, rt0, m, dst, edst);
138 if (error)

--- 243 unchanged lines hidden (view full) ---

382 goto dropanyway;
383 }
384 fh = mtod(m, struct fddi_header *);
385 m->m_pkthdr.header = (void *)fh;
386
387 /*
388 * Discard packet if interface is not up.
389 */
132 senderr(ENETDOWN);
133 getmicrotime(&ifp->if_lastchange);
134
135 switch (dst->sa_family) {
136#ifdef INET
137 case AF_INET: {
138 error = arpresolve(ifp, rt0, m, dst, edst);
139 if (error)

--- 243 unchanged lines hidden (view full) ---

383 goto dropanyway;
384 }
385 fh = mtod(m, struct fddi_header *);
386 m->m_pkthdr.header = (void *)fh;
387
388 /*
389 * Discard packet if interface is not up.
390 */
390 if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING))
391 if (!((ifp->if_flags & IFF_UP) &&
392 (ifp->if_drv_flags & IFF_DRV_RUNNING)))
391 goto dropanyway;
392
393 /*
394 * Give bpf a chance at the packet.
395 */
396 BPF_MTAP(ifp, m);
397
398 /*

--- 390 unchanged lines hidden ---
393 goto dropanyway;
394
395 /*
396 * Give bpf a chance at the packet.
397 */
398 BPF_MTAP(ifp, m);
399
400 /*

--- 390 unchanged lines hidden ---