From nobody@FreeBSD.org  Sat Feb 18 14:21:02 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 64E4016A420
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 18 Feb 2006 14:21:02 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3098143D45
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 18 Feb 2006 14:21:02 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k1IEL1Bo079155
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 18 Feb 2006 14:21:01 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k1IEL1iH079130;
	Sat, 18 Feb 2006 14:21:01 GMT
	(envelope-from nobody)
Message-Id: <200602181421.k1IEL1iH079130@www.freebsd.org>
Date: Sat, 18 Feb 2006 14:21:01 GMT
From: Cristian KLEIN <cristi@net.utcluj.ro>
To: freebsd-gnats-submit@FreeBSD.org
Subject: IPv6 Multicast Listener Reports (MLD6 Reports) are not being sent on 6.1-PRERELEASE #5
X-Send-Pr-Version: www-2.3

>Number:         93526
>Category:       kern
>Synopsis:       IPv6 Multicast Listener Reports (MLD6 Reports) are not being sent on 6.1-PRERELEASE #5
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb 18 14:30:04 GMT 2006
>Closed-Date:    Mon Mar 05 09:52:30 GMT 2007
>Last-Modified:  Mon Mar 05 09:52:30 GMT 2007
>Originator:     Cristian KLEIN
>Release:        6.1-PRERELEASE #5, GENERIC + ALTQ + POLLING
>Organization:
Technical Univerisity of Cluj-Napoca
>Environment:
FreeBSD hades.utcluj.ro 6.1-PRERELEASE FreeBSD 6.1-PRERELEASE #5: Fri Feb 17 16:53:00 EET 2006     root@hades.utcluj.ro:/usr/obj/usr/src/sys/HADES  i386
>Description:
After a host joins an IPv6 multicast group, the router periodically sends Multicast Listener Query, to find out whether the group still has to be routed. A host must answer with Multicast Lister Response, or he'll be disconnected.

FreeBSD 6.1-PRERELEASE #5 does not send these reports.


root@hades:~# netstat -g
<snip>
IPv4/IPv6 Multicast Group Memberships
Group                   Gateway                 Netif
<snip>
ff0e::2:ffdd            33:33:00:02:ff:dd       em0
<snip>

root@hades:~# mld6query em0 ff0e::2:ffdd
from fe80::211:25ff:fe80:b091, type=Multicast Listener Query, addr=ff0e::2:ffdd
<command exits with no response>

>How-To-Repeat:
First, install net/mcast-tools from ports.

Join a multicast group:
root@hades:~# mcastread em0 ff0e::2222:1111 2000 &
[1] 1666

Verify that the kernel knows we want that group:
root@hades:~# netstat -g | grep ff0e::2222:1111
ff0e::2222:1111         33:33:22:22:11:11       em0

Query for that group:
root@hades:~# mld6query em0 ff0e::2222:1111
from fe80::211:25ff:fe80:b091, type=Multicast Listener Query, addr=ff0e::2222:1111

Actual result: no response.
Expected result: Multicast Listener Report for ff0e::2222:1111.



>Fix:

>Release-Note:
>Audit-Trail:

From: Cristian KLEIN <cristi@net.utcluj.ro>
To: bug-followup@FreeBSD.org,  cristi@net.utcluj.ro
Cc:  
Subject: Re: kern/93526: IPv6 Multicast Listener Reports (MLD6 Reports) are
 not being sent on 6.1-PRERELEASE #5
Date: Sat, 18 Feb 2006 23:26:19 +0200

 This is a multi-part message in MIME format.
 --------------010205060705000004050405
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 I found out that the problema has to do with the timer that sends the
 MLD report, but I wasn't able to fix it.
 
 However, I applied a very ugly workaround. Instead of sending MLD
 Reports in the next 0 to timer milliseconds, they are sent immediately.
 
 I hope this will be useful.
 
 --------------010205060705000004050405
 Content-Type: text/x-patch;
  name="mld6.patch"
 Content-Transfer-Encoding: 7bit
 Content-Disposition: inline;
  filename="mld6.patch"
 
 --- sys/netinet6/mld6.c.orig	Sat Feb 18 23:18:27 2006
 +++ sys/netinet6/mld6.c	Sat Feb 18 23:18:41 2006
 @@ -384,9 +384,13 @@
  			    IPV6_ADDR_MC_SCOPE(&in6m->in6m_addr) <
  			    IPV6_ADDR_SCOPE_LINKLOCAL)
  				continue;
 -
 +				
  			if (IN6_IS_ADDR_UNSPECIFIED(&mld_addr) ||
  			    IN6_ARE_ADDR_EQUAL(&mld_addr, &in6m->in6m_addr)) {
 +	
 +				/* KC: very ugly hack */
 +				mld6_sendpkt(in6m, MLD_LISTENER_REPORT, NULL);
 +				
  				if (timer == 0) {
  					/* send a report immediately */
  					mld_stoptimer(in6m);
 
 --------------010205060705000004050405--
State-Changed-From-To: open->feedback 
State-Changed-By: suz 
State-Changed-When: Sat Mar 4 09:20:57 UTC 2006 
State-Changed-Why:  
the fix has been committed to -current (sys/netinet6/mld6.c Rev. 1.27) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=93526 
State-Changed-From-To: feedback->closed 
State-Changed-By: bms 
State-Changed-When: Mon Mar 5 09:52:14 UTC 2007 
State-Changed-Why:  
Timeout feedback on old PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=93526 
>Unformatted:
