From nobody@FreeBSD.org  Wed Dec 15 01:37:51 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 B9565106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 15 Dec 2010 01:37:51 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (unknown [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id A7FA98FC16
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 15 Dec 2010 01:37:51 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id oBF1bpax024330
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 15 Dec 2010 01:37:51 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id oBF1bpjh024329;
	Wed, 15 Dec 2010 01:37:51 GMT
	(envelope-from nobody)
Message-Id: <201012150137.oBF1bpjh024329@red.freebsd.org>
Date: Wed, 15 Dec 2010 01:37:51 GMT
From: Renato Tambellini <rtsanch@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: IPFIREWALL does not allow specify rules with ICMP codes
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         153161
>Category:       kern
>Synopsis:       [ipfw] does not support specifying rules with ICMP codes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ipfw
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 15 01:40:10 UTC 2010
>Closed-Date:    
>Last-Modified:  Mon Feb 27 13:16:56 UTC 2012
>Originator:     Renato Tambellini
>Release:        8.1-STABLE
>Organization:
Private
>Environment:
FreeBSD devilbox.homeunix.net 8.1-STABLE FreeBSD 8.1-STABLE #0: Sun Nov 21 16:38:20 BRST 2010     root@devilbox.homeunix.net:/usr/obj/usr/src/sys/DEVILBOX  amd64
>Description:
The IPFIREWALL does not support specify rules with ICMP codes.

Example:

I try to create a rule to accept packets like this captured in debug mode:
Dec 14 23:08:44 devilbox kernel: ipfw: 400 Accept ICMP:3.4 192.168.1.5 192.168.1.11 in via wlan1

Error when trying to create rule:
# ipfw 500 add allow icmp from 192.168.1.5 to me icmptypes 3.4 
ipfw: invalid ICMP type
Exit 65

RFC792:
ICMP type 3 (destination unreachable)
ICMP type 3, code 4 (fragmentation needed and DF set)

* This problem also occur in all ICMP types and codes.
>How-To-Repeat:
ipfw 500 add allow icmp from 192.168.1.5 to me icmptypes 3.4
>Fix:
Create methods that make possible IPFIREWALL and ipfw interface accept specify ICMP codes.

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: ae 
State-Changed-When: Wed Dec 15 05:04:39 UTC 2010 
State-Changed-Why:  
Expected behaviour. A numeric list of icmptypes should 
be separated by commas. See ipfw(8) manual page. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=153161 
State-Changed-From-To: closed->open 
State-Changed-By: ae 
State-Changed-When: Wed Dec 15 05:44:49 UTC 2010 
State-Changed-Why:  
Reopen PR and assign over to maintainer. 
ipfw currently does not support icmp codes. 


Responsible-Changed-From-To: freebsd-bugs->freebsd-ipfw 
Responsible-Changed-By: ae 
Responsible-Changed-When: Wed Dec 15 05:44:49 UTC 2010 
Responsible-Changed-Why:  
Reopen PR and assign over to maintainer. 
ipfw currently does not support icmp codes. 

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