From martin@email.aon.at  Sat May 13 07:42:46 2006
Return-Path: <martin@email.aon.at>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id CD66116A40D
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 13 May 2006 07:42:46 +0000 (UTC)
	(envelope-from martin@email.aon.at)
Received: from email.aon.at (WARSL402PIP6.highway.telekom.at [195.3.96.93])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 0256E43D48
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 13 May 2006 07:42:45 +0000 (GMT)
	(envelope-from martin@email.aon.at)
Received: (qmail 13233 invoked from network); 13 May 2006 07:42:44 -0000
Received: from m1463p010.adsl.highway.telekom.at (HELO gandalf.xyzzy) ([80.121.54.202])
          (envelope-sender <martin@email.aon.at>)
          by smarthub74.highway.telekom.at (qmail-ldap-1.03) with SMTP
          for <FreeBSD-gnats-submit@freebsd.org>; 13 May 2006 07:42:44 -0000
Received: from gandalf.xyzzy (localhost.xyzzy [127.0.0.1])
	by gandalf.xyzzy (8.13.6/8.13.6) with ESMTP id k4D7ggeg006312
	for <FreeBSD-gnats-submit@freebsd.org>; Sat, 13 May 2006 09:42:42 +0200 (CEST)
	(envelope-from martin@gandalf.xyzzy)
Received: (from martin@localhost)
	by gandalf.xyzzy (8.13.6/8.13.6/Submit) id k4D7ggdx006311;
	Sat, 13 May 2006 09:42:42 +0200 (CEST)
	(envelope-from martin)
Message-Id: <200605130742.k4D7ggdx006311@gandalf.xyzzy>
Date: Sat, 13 May 2006 09:42:42 +0200 (CEST)
From: Martin Birgmeier <martin@email.aon.at>
Reply-To: Martin Birgmeier <martin@email.aon.at>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [patch] [ipfw] ipfw does not correctly list dynamic IPv6 rules
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         97194
>Category:       bin
>Synopsis:       [patch] [ipfw] ipfw does not correctly list dynamic IPv6 rules
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ipfw
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 13 07:50:13 GMT 2006
>Closed-Date:    Thu Jun 08 17:21:41 GMT 2006
>Last-Modified:  Thu Jun 08 17:21:41 GMT 2006
>Originator:     Martin Birgmeier
>Release:        FreeBSD 6.1-RELEASE i386
>Organization:
MBi at home
>Environment:
System: FreeBSD gandalf.xyzzy 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Thu May 11 21:56:57 CEST 2006 root@marvin.xyzzy:/usr/VOL/OBJ/FreeBSD/RELENG_6_1_0_RELEASE/src/sys/GANDALF i386


>Description:
	/sbin/ipfw always assumes IPv4 addresses when listing dynamic
	firewall rules. IPv6 addresses are shown as 0.0.0.0.
>How-To-Repeat:
	Create Internet traffic such that dynamic IPv6 rules are established.
	Then list those rules using, e.g., "ipfw -d show". Dynamic IPv6
	rules will be shown incorrectly.
>Fix:

*** sbin/ipfw/ipfw2.c.ORIG	Thu Mar  9 10:18:37 2006
--- sbin/ipfw/ipfw2.c	Sat May 13 09:26:46 2006
***************
*** 1959,1969 ****
  	else
  		printf(" proto %u", d->id.proto);
  
! 	a.s_addr = htonl(d->id.src_ip);
! 	printf(" %s %d", inet_ntoa(a), d->id.src_port);
  
! 	a.s_addr = htonl(d->id.dst_ip);
! 	printf(" <-> %s %d", inet_ntoa(a), d->id.dst_port);
  	printf("\n");
  }
  
--- 1959,1981 ----
  	else
  		printf(" proto %u", d->id.proto);
  
! 	if (IS_IP6_FLOW_ID(&(d->id))) {
! 		char buff[255];
  
! 		/* XXX no error checking */
! 		inet_ntop(AF_INET6, &(d->id.src_ip6), buff, sizeof(buff));
! 		printf(" %s %d", buff, d->id.src_port);
! 
! 		/* XXX no error checking */
! 		inet_ntop(AF_INET6, &(d->id.dst_ip6), buff, sizeof(buff));
! 		printf(" <-> %s %d", buff, d->id.dst_port);
! 	} else {
! 		a.s_addr = htonl(d->id.src_ip);
! 		printf(" %s %d", inet_ntoa(a), d->id.src_port);
! 
! 		a.s_addr = htonl(d->id.dst_ip);
! 		printf(" <-> %s %d", inet_ntoa(a), d->id.dst_port);
! 	}
  	printf("\n");
  }
  



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-ipfw 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat May 13 14:07:31 UTC 2006 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=97194 
State-Changed-From-To: open->closed 
State-Changed-By: oleg 
State-Changed-When: Thu Jun 8 17:20:44 UTC 2006 
State-Changed-Why:  
Closed in favour of bin/98349 


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