From nobody@FreeBSD.org  Sun Feb  4 06:11:53 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 7DCDC16A401
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  4 Feb 2007 06:11:53 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id 6E82513C461
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  4 Feb 2007 06:11:53 +0000 (UTC)
	(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 l146BrEr003979
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 4 Feb 2007 06:11:53 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l146Brfc003978;
	Sun, 4 Feb 2007 06:11:53 GMT
	(envelope-from nobody)
Message-Id: <200702040611.l146Brfc003978@www.freebsd.org>
Date: Sun, 4 Feb 2007 06:11:53 GMT
From: Jonathan Liu<Net147@hotmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [w] IPv6 addresses truncated to maximum IPv4 address length
X-Send-Pr-Version: www-3.0

>Number:         108742
>Category:       bin
>Synopsis:       [w] IPv6 addresses truncated to maximum IPv4 address length
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 04 06:20:12 GMT 2007
>Closed-Date:    Sun Feb 04 09:40:58 GMT 2007
>Last-Modified:  Sun Feb 04 09:40:58 GMT 2007
>Originator:     Jonathan Liu
>Release:        6.2-RELEASE
>Organization:
>Environment:
FreeBSD freebsd 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 10:40:27 UTC 2007     root@dessler.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
When a remote user logs into a FreeBSD machine using IPv6 with either ssh or telnet, typing the "w" command shows the remote user's IPv6 address truncated to the maximum IPv4 address length (16 characters).

This makes it very difficult to track down the user's IPv6 address if the address is longer than 16 characters in IPv6 shorthand form.

For example, the IPv6 address fd00:0:100::5:123 would be truncated to fd00:0:100::5:12.

Example output:
testuser           ttyp1     4 Feb 16:39 (fd00:0:100::5:12)
>How-To-Repeat:
On FreeBSD machine:
ifconfig lnc0 inet6 fd00:0:100::5:1
echo 'sshd_enable="YES"'>>/etc/rc.conf
/etc/rc.d/sshd start

On remote machine (FreeBSD):
ifconfig lnc0 inet6 fd00:0:100::5:123
ssh myusername@fd00:0:100::5:1

Then, back on FreeBSD machine:
w
>Fix:

>Release-Note:
>Audit-Trail:

From: "Jonathan Liu" <Net147@hotmail.com>
To: <bug-followup@FreeBSD.org>,
	<Net147@hotmail.com>
Cc:  
Subject: Re: bin/108742: [w] IPv6 addresses truncated to maximum IPv4 address length
Date: Sun, 4 Feb 2007 17:34:25 +1100

 Sorry, that sample output is from who not w.
 
 Sample output from w:
 5:31pm  up 2 days,  3:11, 2 users, load averages: 0.00, 0.00, 0.00
 USER             TTY      FROM              LOGIN@  IDLE WHAT
 testuser         p1       fd00:0:100::5:12    Sat12pm     - w
 
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Sun Feb 4 09:40:56 UTC 2007 
State-Changed-Why:  
duplicate of 108743 

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