From 21e15c9a3ee623b92d80dfce45e2ffa2201ce500 Mon Sep 17 00:00:00 2001 From: Stuart Henderson Date: Fri, 22 Aug 2014 22:14:54 +0000 Subject: print leading 0's in MAC addresses again, ok deraadt --- usr.sbin/arp/arp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/arp') diff --git a/usr.sbin/arp/arp.c b/usr.sbin/arp/arp.c index ffb45e239c9..63729575998 100644 --- a/usr.sbin/arp/arp.c +++ b/usr.sbin/arp/arp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arp.c,v 1.59 2014/08/21 10:23:47 mpi Exp $ */ +/* $OpenBSD: arp.c,v 1.60 2014/08/22 22:14:53 sthen Exp $ */ /* $NetBSD: arp.c,v 1.12 1995/04/24 13:25:18 cgd Exp $ */ /* @@ -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)"); -- cgit v1.2.3