summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2009-12-19 23:55:13 -0800
committerMarcel Holtmann <marcel@holtmann.org>2009-12-19 23:55:13 -0800
commitcfc737cc8b047b133ff6f0caaac17f8dd4e1bf9f (patch)
treed22a05a4c138d1a3b20c3a0f83e5c7022f8db660 /src
parentacb0072937c2e3d880c4d062f98d40db95e791da (diff)
downloadconnman-cfc737cc8b047b133ff6f0caaac17f8dd4e1bf9f.tar.gz
connman-cfc737cc8b047b133ff6f0caaac17f8dd4e1bf9f.tar.bz2
connman-cfc737cc8b047b133ff6f0caaac17f8dd4e1bf9f.zip
Fix debugging output of link address
Diffstat (limited to 'src')
-rw-r--r--src/rtnl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/rtnl.c b/src/rtnl.c
index 9bc8319b..2bc77caa 100644
--- a/src/rtnl.c
+++ b/src/rtnl.c
@@ -282,13 +282,13 @@ static void extract_link(struct ifinfomsg *msg, int bytes,
static void process_newlink(unsigned short type, int index, unsigned flags,
unsigned change, struct ifinfomsg *msg, int bytes)
{
- struct ether_addr address;
+ struct ether_addr address = {{ 0, 0, 0, 0, 0, 0 }};
+ struct ether_addr compare = {{ 0, 0, 0, 0, 0, 0 }};
unsigned char operstate = 0xff;
const char *ifname = NULL;
unsigned int mtu = 0;
GSList *list;
- memset(&address, 0, ETH_ALEN);
extract_link(msg, bytes, &address, &ifname, &mtu, &operstate);
switch (type) {
@@ -300,7 +300,8 @@ static void process_newlink(unsigned short type, int index, unsigned flags,
break;
}
- connman_info("%s {newlink} index %d address %s mtu %u",
+ if (memcmp(&address, &compare, ETH_ALEN) != 0)
+ connman_info("%s {newlink} index %d address %s mtu %u",
ifname, index, ether_ntoa(&address), mtu);
if (operstate != 0xff)