From nobody@FreeBSD.org  Tue Feb 15 10:27:22 2005
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 635D616A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 15 Feb 2005 10:27:22 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 4A73143D5C
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 15 Feb 2005 10:27:22 +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 j1FARLiB080711
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 15 Feb 2005 10:27:21 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id j1FARLM4080710;
	Tue, 15 Feb 2005 10:27:21 GMT
	(envelope-from nobody)
Message-Id: <200502151027.j1FARLM4080710@www.freebsd.org>
Date: Tue, 15 Feb 2005 10:27:21 GMT
From: Joerg Wallerich <jw@net.in.tum.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: type mismatch in IPv6 firewall rule parser
X-Send-Pr-Version: www-2.3

>Number:         77554
>Category:       bin
>Synopsis:       type mismatch in IPv6 firewall rule parser
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 15 10:30:20 GMT 2005
>Closed-Date:    Wed Mar 05 12:01:32 UTC 2008
>Last-Modified:  Wed Mar 05 12:01:32 UTC 2008
>Originator:     Joerg Wallerich
>Release:        5.3-STABLE, Tue Feb 15 2005
>Organization:
Technische Universitaet Muenchen
>Environment:
FreeBSD falcon.net.in.tum.de 5.3-STABLE FreeBSD 5.3-STABLE #7: Tue Feb 15 11:01:37 CET 2005 root@falcon.net.in.tum.de:/usr/obj/usr/src/sys/FALCON  amd64      
>Description:
sbin/ip6fw has a type mismatch (unsigned in struct declaration vs.
u_long as parameter type) that leads to errors in the rule parser for
icmp type codes. This is a problem on all 64-bit platforms, where
sizeof(int) != sizeof(long)
>How-To-Repeat:
falcon# ip6fw add allow ipv6-icmp from any to any icmptype 128,129
00000 allow ipv6-icmp from any to any icmptype

>Fix:
--- ip6fw.c.orig        Tue Feb 15 11:11:43 2005
+++ ip6fw.c     Tue Feb 15 11:26:30 2005
@@ -764,7 +764,7 @@
 
 void
 fill_icmptypes(types, vp, fw_flg)
-       u_long *types;
+       unsigned *types;
        char **vp;
        u_short *fw_flg;
 {

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: vwe 
State-Changed-When: Wed Mar 5 00:42:12 UTC 2008 
State-Changed-Why:  

Is this still a problem with recent versions of FreeBSD? 
Please note: 
-ip6fw has gone as IPv6 support has been integrated into ipfw 

Trying an adoption of your sample on R7 gives: 
# ipfw add allow icmp6 from any to any icmp6types 128,129 
00400 allow ipv6-icmp from any to any ip6 icmp6types 128,129 
...which is looking good. 

If you don't see this problem anymore, please agree to close this PR. 
Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=77554 
State-Changed-From-To: feedback->closed 
State-Changed-By: vwe 
State-Changed-When: Wed Mar 5 12:00:05 UTC 2008 
State-Changed-Why:  
Fixed, thanks! 

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