On 22/08/14(Fri) 22:54, Stuart Henderson wrote:
> can we go back to the standard MAC address formatting that's used
> everywhere except ndp?

Fine with me, any reason not to do it for ndp too?

> 
> Index: arp.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/arp/arp.c,v
> retrieving revision 1.59
> diff -u -p -r1.59 arp.c
> --- arp.c     21 Aug 2014 10:23:47 -0000      1.59
> +++ arp.c     22 Aug 2014 21:53:24 -0000
> @@ -595,7 +595,7 @@ ether_str(struct sockaddr_dl *sdl)
>  
>       if (sdl->sdl_alen) {
>               cp = (u_char *)LLADDR(sdl);
> -             snprintf(hbuf, sizeof(hbuf), "%x:%x:%x:%x:%x:%x",
> +             snprintf(hbuf, sizeof(hbuf), "%02x:%02x:%02x:%02x:%02x:%02x",
>                   cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]);
>       } else
>               snprintf(hbuf, sizeof(hbuf), "(incomplete)");
> 

Reply via email to