summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2008-04-10 22:33:15 +0000
committerBrad Smith <brad@cvs.openbsd.org>2008-04-10 22:33:15 +0000
commit809a2c5adf7ac3bbd6d750fd38725a635cd2a0c4 (patch)
tree77a075bf98eb547173ea3133eae1bef37407b006 /sys/net
parent08d3274a40ea6a5c7cd2bc6691ce5e0c9195f293 (diff)
Also count multicast packets and input bytes for interfaces enslaved by
trunk(4). PR 5248 ok reyk@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_ethersubr.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c
index 26e2b69bd29..08c3c67968e 100644
--- a/sys/net/if_ethersubr.c
+++ b/sys/net/if_ethersubr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ethersubr.c,v 1.114 2008/02/05 22:57:30 mpf Exp $ */
+/* $OpenBSD: if_ethersubr.c,v 1.115 2008/04/10 22:33:14 brad Exp $ */
/* $NetBSD: if_ethersubr.c,v 1.19 1996/05/07 02:40:30 thorpej Exp $ */
/*
@@ -449,8 +449,8 @@ bad:
* the ether header, which is provided separately.
*/
void
-ether_input(ifp, eh, m)
- struct ifnet *ifp;
+ether_input(ifp0, eh, m)
+ struct ifnet *ifp0;
struct ether_header *eh;
struct mbuf *m;
{
@@ -459,6 +459,7 @@ ether_input(ifp, eh, m)
int s, llcfound = 0;
struct llc *l;
struct arpcom *ac;
+ struct ifnet *ifp = ifp0;
#if NTRUNK > 0
int i = 0;
#endif
@@ -518,9 +519,17 @@ ether_input(ifp, eh, m)
else
m->m_flags |= M_MCAST;
ifp->if_imcasts++;
+#if NTRUNK > 0
+ if (ifp != ifp0)
+ ifp0->if_imcasts++;
+#endif
}
ifp->if_ibytes += m->m_pkthdr.len + sizeof(*eh);
+#if NTRUNK > 0
+ if (ifp != ifp0)
+ ifp0->if_ibytes += m->m_pkthdr.len + sizeof(*eh);
+#endif
etype = ntohs(eh->ether_type);