Commit 4dba720d authored by Dan Winship's avatar Dan Winship
Browse files

platform: fix handling of labels

If an address has a label without a ':' in it (eg, its label is just
$DEVICE, not $DEVICE:$NUM), then ignore it.
parent 726e84cf
......@@ -892,7 +892,8 @@ init_ip4_address (NMPlatformIP4Address *address, struct rtnl_addr *rtnladdr)
memcpy (&address->peer_address, nl_addr_get_binary_addr (nlpeer), sizeof (address->peer_address));
}
label = rtnl_addr_get_label (rtnladdr);
if (label && *label)
/* Check for ':'; we're only interested in labels used as interface aliases */
if (label && strchr (label, ':'))
g_strlcpy (address->label, label, sizeof (address->label));
return TRUE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment