do not count address family field twice in tun's if_obytes stats.
ok henning@ reyk@ deraadt@ for the ethernet bits.
ok deraadt@ for the tun bits.
-/* $OpenBSD: if_ethersubr.c,v 1.122 2008/06/13 23:24:21 mpf Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.123 2008/08/04 18:55:08 damien Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
splx(s);
return (error);
}
- ifp->if_obytes += len + ETHER_HDR_LEN;
+ ifp->if_obytes += len;
#if NCARP > 0
if (ifp != ifp0)
- ifp0->if_obytes += len + ETHER_HDR_LEN;
+ ifp0->if_obytes += len;
#endif /* NCARP > 0 */
if (mflags & M_MCAST)
ifp->if_omcasts++;
-/* $OpenBSD: if_tun.c,v 1.93 2008/05/07 05:51:12 mpf Exp $ */
+/* $OpenBSD: if_tun.c,v 1.94 2008/08/04 18:55:08 damien Exp $ */
/* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */
/*
bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT);
#endif
- len = m0->m_pkthdr.len + sizeof(*af);
+ len = m0->m_pkthdr.len;
s = splnet();
IFQ_ENQUEUE(&ifp->if_snd, m0, NULL, error);
if (error) {