diff options
author | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2016-02-08 22:44:38 +0000 |
---|---|---|
committer | Jeremie Courreges-Anglas <jca@cvs.openbsd.org> | 2016-02-08 22:44:38 +0000 |
commit | 21fdbea144f799154845331b9ab4772900babf06 (patch) | |
tree | 430841fba5b41af5b05b52a44cee93d9f400cfe3 /usr.sbin | |
parent | 6496f5d3d43c902b3841fc577c5b98a5b7b41205 (diff) |
Print MAX addresses padded with a leading zero.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/rtadvd/dump.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/rtadvd/dump.c b/usr.sbin/rtadvd/dump.c index 34b26403782..e7b87287149 100644 --- a/usr.sbin/rtadvd/dump.c +++ b/usr.sbin/rtadvd/dump.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dump.c,v 1.17 2015/12/11 20:15:52 mmcc Exp $ */ +/* $OpenBSD: dump.c,v 1.18 2016/02/08 22:44:37 jca Exp $ */ /* $KAME: dump.c,v 1.27 2002/05/29 14:23:55 itojun Exp $ */ /* @@ -78,8 +78,8 @@ 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", - cp[0], cp[1], cp[2], cp[3], cp[4], cp[5]); + 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), "NONE"); |