From nobody@FreeBSD.org  Fri Dec 24 18:52:24 2004
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 D8A6F16A4CE
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 24 Dec 2004 18:52:24 +0000 (GMT)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id C1CA943D2F
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 24 Dec 2004 18:52:24 +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 iBOIqOxv002607
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 24 Dec 2004 18:52:24 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id iBOIqO2I002606;
	Fri, 24 Dec 2004 18:52:24 GMT
	(envelope-from nobody)
Message-Id: <200412241852.iBOIqO2I002606@www.freebsd.org>
Date: Fri, 24 Dec 2004 18:52:24 GMT
From: Jon Simola <jsimola@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Inconsistent MAC formatting by /usr/sbin/arp on vlan pseudo interfaces
X-Send-Pr-Version: www-2.3

>Number:         75471
>Category:       bin
>Synopsis:       Inconsistent MAC formatting by /usr/sbin/arp on vlan pseudo interfaces
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ru
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 24 19:00:44 GMT 2004
>Closed-Date:    Mon Dec 27 14:31:35 GMT 2004
>Last-Modified:  Mon Dec 27 14:31:35 GMT 2004
>Originator:     Jon Simola
>Release:        5.3-STABLE
>Organization:
>Environment:
FreeBSD tycho.abccomm.com 5.3-STABLE FreeBSD 5.3-STABLE #1: Wed Dec 22 17:11:02 PST 2004     jon@tycho.abccomm.com:/usr/obj/usr/src/sys/CARP  i386
>Description:
Sample output from my Vlan router
#/usr/sbin/arp -an
? (204.239.167.99) at 00:90:27:76:a9:9c on em0 [ethernet]
? (204.239.167.248) at 00:30:48:72:36:24 on em0 [ethernet]
<...>
? (208.181.67.228) at 0.30.ab.4.43.4 on vlan100 [vlan]
? (208.181.68.97) at 0.1.2.3.4.5 on vlan100 [vlan]

I expected zero-filled and colon seperated MACs, the non filled and dot seperated MACs on the vlan interfaces are suprising.
>How-To-Repeat:
/usr/sbin/arp on any vlan pseudointerface.
>Fix:
--- usr.sbin/arp/arp.c.orig     Fri Dec 24 11:45:11 2004
+++ usr.sbin/arp/arp.c  Fri Dec 24 11:53:04 2004
@@ -523,7 +523,7 @@
        }
        printf("%s (%s) at ", host, inet_ntoa(addr-&gt;sin_addr));
        if (sdl-&gt;sdl_alen) {
-               if (sdl-&gt;sdl_type == IFT_ETHER &&
+               if ((sdl-&gt;sdl_type == IFT_ETHER || sdl->sdl_type == IFT_L2VLAN) &&
                    sdl-&gt;sdl_alen == ETHER_ADDR_LEN)
                        printf("%s", ether_ntoa((struct ether_addr *)LLADDR(sdl)));
                else {

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->patched 
State-Changed-By: ru 
State-Changed-When: Fri Dec 24 22:17:00 GMT 2004 
State-Changed-Why:  
Patch committed to HEAD, thanks! 


Responsible-Changed-From-To: freebsd-bugs->ru 
Responsible-Changed-By: ru 
Responsible-Changed-When: Fri Dec 24 22:17:00 GMT 2004 
Responsible-Changed-Why:  

http://www.freebsd.org/cgi/query-pr.cgi?pr=75471 
State-Changed-From-To: patched->closed 
State-Changed-By: ru 
State-Changed-When: Mon Dec 27 14:31:18 GMT 2004 
State-Changed-Why:  
Merged to RELENG_5. 

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