ng_ether.c (147256) | ng_ether.c (148887) |
---|---|
1 2/* 3 * ng_ether.c 4 */ 5 6/*- 7 * Copyright (c) 1996-2000 Whistle Communications, Inc. 8 * All rights reserved. --- 25 unchanged lines hidden (view full) --- 34 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 36 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 37 * OF SUCH DAMAGE. 38 * 39 * Authors: Archie Cobbs <archie@freebsd.org> 40 * Julian Elischer <julian@freebsd.org> 41 * | 1 2/* 3 * ng_ether.c 4 */ 5 6/*- 7 * Copyright (c) 1996-2000 Whistle Communications, Inc. 8 * All rights reserved. --- 25 unchanged lines hidden (view full) --- 34 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 35 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 36 * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 37 * OF SUCH DAMAGE. 38 * 39 * Authors: Archie Cobbs <archie@freebsd.org> 40 * Julian Elischer <julian@freebsd.org> 41 * |
42 * $FreeBSD: head/sys/netgraph/ng_ether.c 147256 2005-06-10 16:49:24Z brooks $ | 42 * $FreeBSD: head/sys/netgraph/ng_ether.c 148887 2005-08-09 10:20:02Z rwatson $ |
43 */ 44 45/* 46 * ng_ether(4) netgraph node type 47 */ 48 49#include <sys/param.h> 50#include <sys/systm.h> --- 545 unchanged lines hidden (view full) --- 596 */ 597static int 598ng_ether_rcv_lower(node_p node, struct mbuf *m) 599{ 600 const priv_p priv = NG_NODE_PRIVATE(node); 601 struct ifnet *const ifp = priv->ifp; 602 603 /* Check whether interface is ready for packets */ | 43 */ 44 45/* 46 * ng_ether(4) netgraph node type 47 */ 48 49#include <sys/param.h> 50#include <sys/systm.h> --- 545 unchanged lines hidden (view full) --- 596 */ 597static int 598ng_ether_rcv_lower(node_p node, struct mbuf *m) 599{ 600 const priv_p priv = NG_NODE_PRIVATE(node); 601 struct ifnet *const ifp = priv->ifp; 602 603 /* Check whether interface is ready for packets */ |
604 if ((ifp->if_flags & (IFF_UP|IFF_RUNNING)) != (IFF_UP|IFF_RUNNING)) { | 604 if (!((ifp->if_flags & IFF_UP) && 605 (ifp->if_drv_flags & IFF_DRV_RUNNING))) { |
605 NG_FREE_M(m); 606 return (ENETDOWN); 607 } 608 609 /* Make sure header is fully pulled up */ 610 if (m->m_pkthdr.len < sizeof(struct ether_header)) { 611 NG_FREE_M(m); 612 return (EINVAL); --- 164 unchanged lines hidden --- | 606 NG_FREE_M(m); 607 return (ENETDOWN); 608 } 609 610 /* Make sure header is fully pulled up */ 611 if (m->m_pkthdr.len < sizeof(struct ether_header)) { 612 NG_FREE_M(m); 613 return (EINVAL); --- 164 unchanged lines hidden --- |