diff options
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/networkd-link.c | 3 | ||||
-rw-r--r-- | src/network/networkd-manager.c | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c index 9d942f436b..a59434019d 100644 --- a/src/network/networkd-link.c +++ b/src/network/networkd-link.c @@ -619,6 +619,7 @@ int link_update(Link *link, sd_rtnl_message *m) { int r; assert(link); + assert(link->network); assert(m); r = sd_rtnl_message_link_get_flags(m, &flags); @@ -645,7 +646,7 @@ int link_update(Link *link, sd_rtnl_message *m) { } 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); diff --git a/src/network/networkd-manager.c b/src/network/networkd-manager.c index 73e0c87f34..07552063ec 100644 --- a/src/network/networkd-manager.c +++ b/src/network/networkd-manager.c @@ -247,9 +247,12 @@ static int manager_rtnl_process_link(sd_rtnl *rtnl, sd_rtnl_message *message, vo 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; } |