diff options
author | brueffer <brueffer@FreeBSD.org> | 2014-02-10 14:47:51 +0000 |
---|---|---|
committer | brueffer <brueffer@FreeBSD.org> | 2014-02-10 14:47:51 +0000 |
commit | b55833da5c7226f3f3e389b0783524be1edfc118 (patch) | |
tree | 26d629766c7b8f661ce1de314b5bc66880b18952 /sys/netinet6/ip6_mroute.c | |
parent | 576b9091dde7bd351640bfde4dd47129aa04def3 (diff) | |
download | FreeBSD-src-b55833da5c7226f3f3e389b0783524be1edfc118.zip FreeBSD-src-b55833da5c7226f3f3e389b0783524be1edfc118.tar.gz |
Only count table lookups when we're actually processing packets.
PR: 183462
Submitted by: Sven-Thorsten Dietrich <thebigcorporation at gmail.com>
Reviewed by: bms
MFC after: 1 month
Diffstat (limited to 'sys/netinet6/ip6_mroute.c')
-rw-r--r-- | sys/netinet6/ip6_mroute.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 8fdfc1f..1ded0f6 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -283,7 +283,6 @@ static VNET_DEFINE(int, pim6); #define MF6CFIND(o, g, rt) do { \ struct mf6c *_rt = mf6ctable[MF6CHASH(o,g)]; \ rt = NULL; \ - MRT6STAT_INC(mrt6s_mfc_lookups); \ while (_rt) { \ if (IN6_ARE_ADDR_EQUAL(&_rt->mf6c_origin.sin6_addr, &(o)) && \ IN6_ARE_ADDR_EQUAL(&_rt->mf6c_mcastgrp.sin6_addr, &(g)) && \ @@ -1099,6 +1098,7 @@ X_ip6_mforward(struct ip6_hdr *ip6, struct ifnet *ifp, struct mbuf *m) * Determine forwarding mifs from the forwarding cache table */ MF6CFIND(ip6->ip6_src, ip6->ip6_dst, rt); + MRT6STAT_INC(mrt6s_mfc_lookups); /* Entry exists, so forward if necessary */ if (rt) { |