summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_trunk.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/net/if_trunk.c b/sys/net/if_trunk.c
index 2bff6485767..3f06b9d4828 100644
--- a/sys/net/if_trunk.c
+++ b/sys/net/if_trunk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_trunk.c,v 1.48 2008/08/06 17:04:28 reyk Exp $ */
+/* $OpenBSD: if_trunk.c,v 1.49 2008/08/07 18:06:17 damien Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Reyk Floeter <reyk@openbsd.org>
@@ -963,16 +963,19 @@ trunk_start(struct ifnet *ifp)
int
trunk_enqueue(struct ifnet *ifp, struct mbuf *m)
{
- int error = 0;
+ int len, error = 0;
+ u_short mflags;
/* Send mbuf */
+ mflags = m->m_flags;
+ len = m->m_pkthdr.len;
IFQ_ENQUEUE(&ifp->if_snd, m, NULL, error);
if (error)
return (error);
if_start(ifp);
- ifp->if_obytes += m->m_pkthdr.len;
- if (m->m_flags & M_MCAST)
+ ifp->if_obytes += len;
+ if (mflags & M_MCAST)
ifp->if_omcasts++;
return (error);