From b59b9ce27dfbc40412a282161e4f22dfcb330c46 Mon Sep 17 00:00:00 2001 From: phk Date: Sun, 9 Jun 1996 17:24:25 +0000 Subject: Also count bytes in if_tun. kern/1253 Reviewed by: phk Submitted by: John Capo --- sys/net/if_tun.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sys/net') diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 6793fd3..972b6fe 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -353,6 +353,7 @@ tunoutput(ifp, m0, dst, rt) ifp->if_collisions++; return (ENOBUFS); } + ifp->if_obytes += m0->m_pkthdr.len; IF_ENQUEUE(&ifp->if_snd, m0); splx(s); ifp->if_opackets++; @@ -578,6 +579,7 @@ tunwrite(dev_t dev, struct uio *uio, int flag) } IF_ENQUEUE(&ipintrq, top); splx(s); + ifp->if_ibytes += tlen; ifp->if_ipackets++; schednetisr(NETISR_IP); return error; -- cgit v1.1