summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-08-15 13:18:50 +0200
committerLennart Poettering <lennart@poettering.net>2014-08-15 13:19:03 +0200
commitdb73295accbec0c6513817f0a64a92018592bb26 (patch)
tree3199040de4a794dc8020c56cab5d8bb8e1155801 /src/network
parentc22bf27beea56516d8f83784759fb30495e058d7 (diff)
util: never use ether_ntoa(), since it formats with %x, not %02x, which makes ethernet addresses look funny
Diffstat (limited to 'src/network')
-rw-r--r--src/network/networkctl.c7
1 files changed, 5 insertions, 2 deletions
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);