summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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)