-/* $OpenBSD: bridgestp.c,v 1.34 2008/06/14 19:13:42 jsing Exp $ */
+/* $OpenBSD: bridgestp.c,v 1.35 2008/08/07 18:09:22 damien Exp $ */
/*
* Copyright (c) 2000 Jason L. Wright (jason@thought.net)
struct ifnet *ifp = bp->bp_ifp;
struct ether_header *eh;
struct mbuf *m;
- int s,error;
+ int s, len, error;
if (ifp == NULL || (ifp->if_flags & IFF_RUNNING) == 0)
return;
s = splnet();
bp->bp_txcount++;
+ len = m->m_pkthdr.len;
IFQ_ENQUEUE(&ifp->if_snd, m, NULL, error);
- if (error == 0)
+ if (error == 0) {
+ ifp->if_obytes += len;
+ ifp->if_omcasts++;
if_start(ifp);
+ }
splx(s);
}
struct ifnet *ifp = bp->bp_ifp;
struct mbuf *m;
struct ether_header *eh;
- int s, error;
+ int s, len, error;
s = splnet();
if (ifp == NULL || (ifp->if_flags & IFF_RUNNING) == 0)
m->m_len = m->m_pkthdr.len;
bp->bp_txcount++;
+ len = m->m_pkthdr.len;
IFQ_ENQUEUE(&ifp->if_snd, m, NULL, error);
- if (error == 0)
+ if (error == 0) {
+ ifp->if_obytes += len;
+ ifp->if_omcasts++;
if_start(ifp);
+ }
done:
splx(s);
}