From 743faed69118e39d9c09ba2ffa9064e63a11453e Mon Sep 17 00:00:00 2001 From: sthen Date: Fri, 22 Aug 2014 22:37:32 +0000 Subject: [PATCH] switch ndp to display MAC addresses in 00:00:00:00:00:00 format, ok deraadt@ --- usr.sbin/ndp/ndp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index ee310f3b47f..98e22d56dc7 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ndp.c,v 1.55 2014/08/19 12:39:36 mpi Exp $ */ +/* $OpenBSD: ndp.c,v 1.56 2014/08/22 22:37:32 sthen Exp $ */ /* $KAME: ndp.c,v 1.101 2002/07/17 08:46:33 itojun Exp $ */ /* @@ -781,7 +781,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)"); -- 2.20.1