misc/75471: Inconsistent MAC formatting by /usr/sbin/arp on vlan pseudo interfaces

Jon Simola jsimola at gmail.com
Fri Dec 24 11:00:45 PST 2004


>Number:         75471
>Category:       misc
>Synopsis:       Inconsistent MAC formatting by /usr/sbin/arp on vlan pseudo interfaces
>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:   Fri Dec 24 19:00:44 GMT 2004
>Closed-Date:
>Last-Modified:
>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 at 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:
>Unformatted:


More information about the freebsd-bugs mailing list