diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-05-20 08:28:55 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-05-20 08:28:55 +0000 |
commit | be9af2c701201ad694c2e49121356595b469026f (patch) | |
tree | 3e26d1fcf4ece7e9621b73a4743cedf72aed7b16 /sys | |
parent | 516de892a39145eb8b22bca142cf89b724b9505d (diff) |
Do not increment if_opackets in if_output(). It might make sense to do
that later but all drivers should be adapated.
Should fix a double output packet accounting, reported by Hrvoje Popovski.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if.c | 3 | ||||
-rw-r--r-- | sys/net/if_tun.c | 3 | ||||
-rw-r--r-- | sys/net/if_vlan.c | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 81461ef6054..b740c41467a 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.332 2015/05/19 11:09:24 mpi Exp $ */ +/* $OpenBSD: if.c,v 1.333 2015/05/20 08:28:54 mpi Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -466,7 +466,6 @@ if_output(struct ifnet *ifp, struct mbuf *m) if (mflags & M_MCAST) ifp->if_omcasts++; - ifp->if_opackets++; if_start(ifp); splx(s); diff --git a/sys/net/if_tun.c b/sys/net/if_tun.c index 06a747b6f38..c66c95b9c1a 100644 --- a/sys/net/if_tun.c +++ b/sys/net/if_tun.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_tun.c,v 1.142 2015/05/19 15:10:59 mpi Exp $ */ +/* $OpenBSD: if_tun.c,v 1.143 2015/05/20 08:28:54 mpi Exp $ */ /* $NetBSD: if_tun.c,v 1.24 1996/05/07 02:40:48 thorpej Exp $ */ /* @@ -576,6 +576,7 @@ tun_output(struct ifnet *ifp, struct mbuf *m0, struct sockaddr *dst, ifp->if_collisions++; return (error); } + ifp->if_opackets++; tun_wakeup(tp); return (0); diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 19b24383a57..7ba86fe9f74 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vlan.c,v 1.121 2015/05/19 11:21:42 mpi Exp $ */ +/* $OpenBSD: if_vlan.c,v 1.122 2015/05/20 08:28:54 mpi Exp $ */ /* * Copyright 1998 Massachusetts Institute of Technology @@ -253,6 +253,7 @@ vlan_start(struct ifnet *ifp) ifp->if_oerrors++; continue; } + ifp->if_opackets++; } } |