From nobody@FreeBSD.org  Thu Sep 30 07:00:39 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 43328106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 30 Sep 2010 07:00:39 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 18EB78FC1F
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 30 Sep 2010 07:00:39 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o8U70cHE058862
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 30 Sep 2010 07:00:38 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o8U70c4J058861;
	Thu, 30 Sep 2010 07:00:38 GMT
	(envelope-from nobody)
Message-Id: <201009300700.o8U70c4J058861@www.freebsd.org>
Date: Thu, 30 Sep 2010 07:00:38 GMT
From: SunMinghao <sunminghao@hotmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: c code error in netinet/igmp.c
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         151100
>Category:       kern
>Synopsis:       c code error in netinet/igmp.c
>Confidential:   no
>Severity:       critical
>Priority:       low
>Responsible:    bz
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Sep 30 07:10:02 UTC 2010
>Closed-Date:    Mon Oct 04 07:06:37 UTC 2010
>Last-Modified:  Mon Oct  4 07:10:04 UTC 2010
>Originator:     SunMinghao
>Release:        8.0 or 8.1
>Organization:
Sumavision Technologies CO., Ltd
>Environment:
source code in 8.0
>Description:
function igmp_input_v1_report in netinet/igmp.c, line 1222 and 1223, bracket match error,
the code as bellow

	if (!IN_MULTICAST(ntohl(igmp->igmp_group.s_addr) ||
	    !in_hosteq(igmp->igmp_group, ip->ip_dst))) {



>How-To-Repeat:
NULL
>Fix:
modified as bellow

	if (!IN_MULTICAST(ntohl(igmp->igmp_group.s_addr)) ||
	    !in_hosteq(igmp->igmp_group, ip->ip_dst)) {

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: bz 
State-Changed-When: Fri Oct 1 09:53:08 UTC 2010 
State-Changed-Why:  
I'll committ he change shortly so proactively mark it patched. 


Responsible-Changed-From-To: freebsd-bugs->bz 
Responsible-Changed-By: bz 
Responsible-Changed-When: Fri Oct 1 09:53:08 UTC 2010 
Responsible-Changed-Why:  
Handle. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151100 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/151100: commit references a PR
Date: Fri,  1 Oct 2010 11:48:20 +0000 (UTC)

 Author: bz
 Date: Fri Oct  1 11:48:14 2010
 New Revision: 213325
 URL: http://svn.freebsd.org/changeset/base/213325
 
 Log:
   Proper bracketing.
   
   PR:		kern/151100
   Submitted by:	SunMinghao (sunminghao hotmail.com)
   MFC after:	3 days
 
 Modified:
   head/sys/netinet/igmp.c
 
 Modified: head/sys/netinet/igmp.c
 ==============================================================================
 --- head/sys/netinet/igmp.c	Fri Oct  1 10:34:35 2010	(r213324)
 +++ head/sys/netinet/igmp.c	Fri Oct  1 11:48:14 2010	(r213325)
 @@ -1219,8 +1219,8 @@ igmp_input_v1_report(struct ifnet *ifp, 
  	if (ifp->if_flags & IFF_LOOPBACK)
  		return (0);
  
 -	if (!IN_MULTICAST(ntohl(igmp->igmp_group.s_addr) ||
 -	    !in_hosteq(igmp->igmp_group, ip->ip_dst))) {
 +	if (!IN_MULTICAST(ntohl(igmp->igmp_group.s_addr)) ||
 +	    !in_hosteq(igmp->igmp_group, ip->ip_dst)) {
  		IGMPSTAT_INC(igps_rcv_badreports);
  		return (EINVAL);
  	}
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: bz 
State-Changed-When: Mon Oct 4 07:05:55 UTC 2010 
State-Changed-Why:  
The change has been merged to RELENG_8. 
Thanks a lot for reporting. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151100 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/151100: commit references a PR
Date: Mon,  4 Oct 2010 07:00:52 +0000 (UTC)

 Author: bz
 Date: Mon Oct  4 07:00:47 2010
 New Revision: 213400
 URL: http://svn.freebsd.org/changeset/base/213400
 
 Log:
   MFC r213325:
   
     Proper bracketing.
   
     Submitted by:	SunMinghao (sunminghao hotmail.com)
   PR:		kern/151100
 
 Modified:
   stable/8/sys/netinet/igmp.c
 Directory Properties:
   stable/8/sys/   (props changed)
   stable/8/sys/amd64/include/xen/   (props changed)
   stable/8/sys/cddl/contrib/opensolaris/   (props changed)
   stable/8/sys/contrib/dev/acpica/   (props changed)
   stable/8/sys/contrib/pf/   (props changed)
   stable/8/sys/dev/xen/xenpci/   (props changed)
 
 Modified: stable/8/sys/netinet/igmp.c
 ==============================================================================
 --- stable/8/sys/netinet/igmp.c	Mon Oct  4 06:49:12 2010	(r213399)
 +++ stable/8/sys/netinet/igmp.c	Mon Oct  4 07:00:47 2010	(r213400)
 @@ -1219,8 +1219,8 @@ igmp_input_v1_report(struct ifnet *ifp, 
  	if (ifp->if_flags & IFF_LOOPBACK)
  		return (0);
  
 -	if (!IN_MULTICAST(ntohl(igmp->igmp_group.s_addr) ||
 -	    !in_hosteq(igmp->igmp_group, ip->ip_dst))) {
 +	if (!IN_MULTICAST(ntohl(igmp->igmp_group.s_addr)) ||
 +	    !in_hosteq(igmp->igmp_group, ip->ip_dst)) {
  		IGMPSTAT_INC(igps_rcv_badreports);
  		return (EINVAL);
  	}
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
>Unformatted:
