If a network is not (yet) set for a link, we do not care about its state (as we
anyway don't know what to do with it).
int r;
assert(link);
+ assert(link->network);
assert(m);
r = sd_rtnl_message_link_get_flags(m, &flags);
} else if (!(link->flags & IFF_LOWER_UP) && flags & IFF_LOWER_UP) {
log_info("%s: connected", link->ifname);
- if (link->network && link->network->dhcp) {
+ if (link->network->dhcp) {
r = link_acquire_conf(link);
if (r < 0) {
link_enter_failed(link);
if (!link)
return 0;
- r = link_update(link, message);
- if (r < 0)
- return 0;
+ /* only track the status of links we want to manage */
+ if (link->network) {
+ r = link_update(link, message);
+ if (r < 0)
+ return 0;
+ }
return 1;
}