From nobody@FreeBSD.org  Sat Mar 21 19:37:12 2009
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 C7EF71065673
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 21 Mar 2009 19:37:12 +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 B50498FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 21 Mar 2009 19:37:12 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n2LJbCXu077888
	for <freebsd-gnats-submit@FreeBSD.org>; Sat, 21 Mar 2009 19:37:12 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n2LJbCeJ077887;
	Sat, 21 Mar 2009 19:37:12 GMT
	(envelope-from nobody)
Message-Id: <200903211937.n2LJbCeJ077887@www.freebsd.org>
Date: Sat, 21 Mar 2009 19:37:12 GMT
From: Yoshitaka AHAREN <yaharen@gm.dns-lab.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ip6fw: argument type of fill_icmptypes is wrong and causes problem on amd64 platform
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         132911
>Category:       bin
>Synopsis:       ip6fw(8): argument type of fill_icmptypes is wrong and causes problem on amd64 platform
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    ume
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 21 19:40:00 UTC 2009
>Closed-Date:    Fri Aug 13 07:36:55 UTC 2010
>Last-Modified:  Fri Aug 13 07:40:02 UTC 2010
>Originator:     Yoshitaka AHAREN
>Release:        FreeBSD 6.4-RELEASE-p3
>Organization:
College of Information Science, University of Tsukuba
>Environment:
FreeBSD freebsd.local 6.4-RELEASE-p3 FreeBSD 6.4-RELEASE-p3 #16: Fri Jan 23 14:46:52 JST 2009     root@freebsd.local:/usr/obj/usr/src/sys/MyKernel  amd64
>Description:
fill_icmptypes in usr/src/sbin/ip6fw/ip6fw.c takes wrong type of argument 'types'. It is defined as array of 'unsgined' in /usr/include/netinet6/ip6_fw.h, but in the prototype of fill_icmptypes it is defined as array of 'u_long'. In amd64 platform, u_long != unsigned. It causes wrong icmp types to pass to ip6fw kernel module.
>How-To-Repeat:
run the following command in amd64 platform:
# ip6fw add 10 allow ipv6-icmp from any to any icmptypes 63
00010 allow ipv6-icmp from any to any icmptype 95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127

>Fix:
Apply attached patch.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: linimon 
State-Changed-When: Sun Mar 22 02:35:04 UTC 2009 
State-Changed-Why:  
Reclassify. 

Note to submitter: the patch did not make it into the PR; can you 
please reply and include it again? 


Responsible-Changed-From-To: freebsd-amd64->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sun Mar 22 02:35:04 UTC 2009 
Responsible-Changed-Why:  

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

From: Yoshitaka AHAREN <yaharen@gm.dns-lab.jp>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/132911: ip6fw(8): argument type of fill_icmptypes is wrong and causes problem on amd64 platform
Date: Sun, 22 Mar 2009 15:11:27 +0900

 --------_49C5D0DF000000007233_MULTIPART_MIXED_
 Content-Type: text/plain; charset="US-ASCII"
 Content-Transfer-Encoding: 7bit
 
 The patch is included in this message. Sorry for your inconvenience.
 --------_49C5D0DF000000007233_MULTIPART_MIXED_
 Content-Type: application/octet-stream;
  name="patch.txt"
 Content-Disposition: attachment;
  filename="patch.txt"
 Content-Transfer-Encoding: base64
 
 LS0tIHNiaW4vaXA2ZncvaXA2ZncuYy5vcmlnICAgICAyMDA5LTAzLTIyIDE0OjMyOjA1LjAwMDAw
 MDAwMCArMDkwMAorKysgc2Jpbi9pcDZmdy9pcDZmdy5jICAyMDA5LTAzLTIyIDE0OjMyOjE5LjAw
 MDAwMDAwMCArMDkwMApAQCAtNzY0LDcgKzc2NCw3IEBACiAKIHZvaWQKIGZpbGxfaWNtcHR5cGVz
 KHR5cGVzLCB2cCwgZndfZmxnKQotCXVfbG9uZyAqdHlwZXM7CisJdW5zaWduZWQgKnR5cGVzOwog
 CWNoYXIgKip2cDsKIAl1X3Nob3J0ICpmd19mbGc7CiB7Cg==
 --------_49C5D0DF000000007233_MULTIPART_MIXED_--
 
State-Changed-From-To: feedback->open 
State-Changed-By: jilles 
State-Changed-When: Sun Aug 1 17:13:28 UTC 2010 
State-Changed-Why:  
Feedback has been received. 
However, note that ip6fw has been deprecated in recent FreeBSD versions. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=132911 
State-Changed-From-To: open->closed 
State-Changed-By: ume 
State-Changed-When: Fri Aug 13 07:35:22 UTC 2010 
State-Changed-Why:  
I've committed your patch into RELENG_6. 
Thank you for the report. 


Responsible-Changed-From-To: freebsd-net->ume 
Responsible-Changed-By: ume 
Responsible-Changed-When: Fri Aug 13 07:35:22 UTC 2010 
Responsible-Changed-Why:  
I've committed your patch into RELENG_6. 
Thank you for the report. 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/132911: commit references a PR
Date: Fri, 13 Aug 2010 07:34:55 +0000 (UTC)

 Author: ume
 Date: Fri Aug 13 07:34:41 2010
 New Revision: 211277
 URL: http://svn.freebsd.org/changeset/base/211277
 
 Log:
   Fix the argument type of fill_icmptypes() on amd64.
   
   PR:		bin/132911
   Submitted by:	Yoshitaka AHAREN <yaharen__at__gm.dns-lab.jp>
 
 Modified:
   stable/6/sbin/ip6fw/ip6fw.c
 
 Modified: stable/6/sbin/ip6fw/ip6fw.c
 ==============================================================================
 --- stable/6/sbin/ip6fw/ip6fw.c	Fri Aug 13 06:39:54 2010	(r211276)
 +++ stable/6/sbin/ip6fw/ip6fw.c	Fri Aug 13 07:34:41 2010	(r211277)
 @@ -764,7 +764,7 @@ fill_ip6opt(u_char *set, u_char *reset, 
  
  void
  fill_icmptypes(types, vp, fw_flg)
 -	u_long *types;
 +	unsigned *types;
  	char **vp;
  	u_short *fw_flg;
  {
 _______________________________________________
 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:
