aboutsummaryrefslogtreecommitdiff
path: root/sys/net/if_vlan.c
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2015-03-25 16:01:46 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2015-03-25 16:01:46 +0000
commitc03044244fa7a7d7cd5b1b56de3966260ae78789 (patch)
tree6b2623f1e407f172287ef834944af6cc73ac5a51 /sys/net/if_vlan.c
parent86750039c61f9e6f0e165fbcbb071af92bcb2964 (diff)
downloadsrc-c03044244fa7a7d7cd5b1b56de3966260ae78789.tar.gz
src-c03044244fa7a7d7cd5b1b56de3966260ae78789.zip
Fix couple of fallouts from r280280. The first one is a simple typo,
where counter was incremented on parent, instead of vlan(4) interface. The second is more complicated. Historically, in our stack the incoming packets are accounted in drivers, while incoming bytes for Ethernet drivers are accounted in ether_input_internal(). Thus, it should be removed from vlan(4) driver. Sponsored by: Netflix Sponsored by: Nginx, Inc.
Notes
Notes: svn path=/head/; revision=280622
Diffstat (limited to 'sys/net/if_vlan.c')
-rw-r--r--sys/net/if_vlan.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c
index c9ff11b66f49..0753e0abab7a 100644
--- a/sys/net/if_vlan.c
+++ b/sys/net/if_vlan.c
@@ -1163,8 +1163,7 @@ vlan_input(struct ifnet *ifp, struct mbuf *m)
TRUNK_RUNLOCK(trunk);
m->m_pkthdr.rcvif = ifv->ifv_ifp;
- if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
- if_inc_counter(ifp, IFCOUNTER_IBYTES, m->m_pkthdr.len);
+ if_inc_counter(ifv->ifv_ifp, IFCOUNTER_IPACKETS, 1);
/* Pass it back through the parent's input routine. */
(*ifp->if_input)(ifv->ifv_ifp, m);