summaryrefslogtreecommitdiff
path: root/src/network/networkd-link.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-01-02 15:56:10 +0100
committerTom Gundersen <teg@jklm.no>2014-01-02 15:56:10 +0100
commit06a6e593011a8af10f8a824a0be140a5085dac3a (patch)
treec1de8e9e2118f49f3e1011fe3ad9d0dfdf291edc /src/network/networkd-link.c
parent449f75549247b3b7b073a788f0f099ce6b7c5378 (diff)
networkd: only track state of links we are managing
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).
Diffstat (limited to 'src/network/networkd-link.c')
-rw-r--r--src/network/networkd-link.c3
1 files changed, 2 insertions, 1 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);