diff options
| author | 2008-08-04 18:55:08 +0000 | |
|---|---|---|
| committer | 2008-08-04 18:55:08 +0000 | |
| commit | 58a6e92cd8c7ae437ee4eda514c74d1e26343498 (patch) | |
| tree | c4fbfb3483a9af28342d4ae9137dd7bda2eaa912 /sys/net/if_ethersubr.c | |
| parent | refuse to run on block devices; prompted by marco; ok marco@ millert@ (diff) | |
| download | wireguard-openbsd-58a6e92cd8c7ae437ee4eda514c74d1e26343498.tar.xz wireguard-openbsd-58a6e92cd8c7ae437ee4eda514c74d1e26343498.zip | |
do not count ethernet header twice in if_obytes stats.
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.
Diffstat (limited to 'sys/net/if_ethersubr.c')
| -rw-r--r-- | sys/net/if_ethersubr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index 6dd11e54023..fb928093639 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -1,4 +1,4 @@ -/* $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 $ */ /* @@ -460,10 +460,10 @@ ether_output(ifp0, m0, dst, rt0) 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++; |
