From owner-freebsd-bugs@FreeBSD.ORG Sat May 13 07:50:15 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1778016A401 for ; Sat, 13 May 2006 07:50:15 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 58BDB43D49 for ; Sat, 13 May 2006 07:50:14 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k4D7oEi0062795 for ; Sat, 13 May 2006 07:50:14 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k4D7oEmT062789; Sat, 13 May 2006 07:50:14 GMT (envelope-from gnats) Resent-Date: Sat, 13 May 2006 07:50:14 GMT Resent-Message-Id: <200605130750.k4D7oEmT062789@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Martin Birgmeier Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD66116A40D for ; 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 ; 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 ) by smarthub74.highway.telekom.at (qmail-ldap-1.03) with SMTP for ; 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 ; 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 To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: bin/97194: [patch] [ipfw] ipfw does not correctly list dynamic IPv6 rules X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Martin Birgmeier List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 May 2006 07:50:15 -0000 >Number: 97194 >Category: bin >Synopsis: [patch] [ipfw] ipfw does not correctly list dynamic IPv6 rules >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat May 13 07:50:13 GMT 2006 >Closed-Date: >Last-Modified: >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: >Unformatted: