From db73295accbec0c6513817f0a64a92018592bb26 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Fri, 15 Aug 2014 13:18:50 +0200 Subject: util: never use ether_ntoa(), since it formats with %x, not %02x, which makes ethernet addresses look funny --- src/network/networkctl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/network') diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 620bc46b8f..33fe8bfc61 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -33,6 +33,7 @@ #include "udev-util.h" #include "arphrd-list.h" #include "local-addresses.h" +#include "socket-util.h" static bool arg_no_pager = false; static bool arg_legend = true; @@ -402,8 +403,10 @@ static int link_status_one(sd_rtnl *rtnl, struct udev *udev, const char *name) { if (model) printf(" Model: %s\n", model); - if (have_mac) - printf(" HW Address: %s\n", ether_ntoa(&e)); + if (have_mac) { + char ea[ETHER_ADDR_TO_STRING_MAX]; + printf(" HW Address: %s\n", ether_addr_to_string(&e, ea)); + } if (mtu > 0) printf(" MTU: %u\n", mtu); -- cgit v1.2.3-54-g00ecf