kern/183462: IPv6 Multicast Lookup Accounting Fix

Sven-Thorsten Dietrich thebigcorporation at gmail.com
Wed Oct 30 03:10:00 UTC 2013


>Number:         183462
>Category:       kern
>Synopsis:       IPv6 Multicast Lookup Accounting Fix
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Oct 30 03:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Sven-Thorsten Dietrich
>Release:        HEAD / 9.1.0
>Organization:
Vyatta
>Environment:
>Description:
Implementation should only count table lookups when processing packets.
internal table accesses should not be counted in the stats.
>How-To-Repeat:
See patch
>Fix:


Patch attached with submission follows:

Subject: Don't count table lookups from add_mfc.
Signed-off-by: Sven-Thorsten Dietrich <thebigcorporation at gmail.com>

Index: sys/netinet6/ip6_mroute.c
===================================================================
--- sys/netinet6/ip6_mroute.c	(revision 256126)
+++ sys/netinet6/ip6_mroute.c	(working copy)
@@ -275,7 +275,6 @@
 #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)) && \
@@ -1124,6 +1123,7 @@
 	/*
 	 * Determine forwarding mifs from the forwarding cache table
 	 */
+	MRT6STAT_INC(mrt6s_mfc_lookups);
 	MF6CFIND(ip6->ip6_src, ip6->ip6_dst, rt);
 
 	/* Entry exists, so forward if necessary */


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list