diff options
author | sthen <sthen@openbsd.org> | 2014-08-22 22:37:32 +0000 |
---|---|---|
committer | sthen <sthen@openbsd.org> | 2014-08-22 22:37:32 +0000 |
commit | 743faed69118e39d9c09ba2ffa9064e63a11453e (patch) | |
tree | 7ebf5a7eeb4f9b00a09bcf9b3bf631a191bf0833 /usr.sbin/ndp | |
parent | print leading 0's in MAC addresses again, ok deraadt (diff) | |
download | wireguard-openbsd-743faed69118e39d9c09ba2ffa9064e63a11453e.tar.xz wireguard-openbsd-743faed69118e39d9c09ba2ffa9064e63a11453e.zip |
switch ndp to display MAC addresses in 00:00:00:00:00:00 format, ok deraadt@
Diffstat (limited to 'usr.sbin/ndp')
-rw-r--r-- | usr.sbin/ndp/ndp.c | 4 |
1 files 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)"); |