diff options
author | Stuart Henderson <sthen@cvs.openbsd.org> | 2014-08-22 22:14:54 +0000 |
---|---|---|
committer | Stuart Henderson <sthen@cvs.openbsd.org> | 2014-08-22 22:14:54 +0000 |
commit | 21e15c9a3ee623b92d80dfce45e2ffa2201ce500 (patch) | |
tree | 5c19362a6efb8b29f12b3148dc8f5deb75e79f49 /usr.sbin/arp | |
parent | 5222b9a527d31516f9eefa830b8ad96a5f957ad7 (diff) |
print leading 0's in MAC addresses again, ok deraadt
Diffstat (limited to 'usr.sbin/arp')
-rw-r--r-- | usr.sbin/arp/arp.c | 4 |
1 files changed, 2 insertions, 2 deletions
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)"); |