summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorUmut Tezduyar Lindskog <umut.tezduyar@axis.com>2014-02-17 21:16:53 +0100
committerTom Gundersen <teg@jklm.no>2014-02-17 23:30:08 +0100
commit17256461f500430e27a64c3f4849e809023e8c4d (patch)
tree2d260854d496e55bbb908656d2492f9d821d64b8 /src
parentacfbbf5c5615dbc413ec653ec31fd8525190e39e (diff)
networkd: act on lease only if there is one
Interface could go down before acquiring a dhcp lease
Diffstat (limited to 'src')
-rw-r--r--src/network/networkd-link.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index d83c4cef8b..9aca1b6477 100644
--- a/src/network/networkd-link.c
+++ b/src/network/networkd-link.c
@@ -626,10 +626,12 @@ static void dhcp_handler(sd_dhcp_client *client, int event, void *userdata) {
return;
}
- r = dhcp_lease_lost(link);
- if (r < 0) {
- link_enter_failed(link);
- return;
+ if (link->dhcp_lease) {
+ r = dhcp_lease_lost(link);
+ if (r < 0) {
+ link_enter_failed(link);
+ return;
+ }
}
if (event == DHCP_EVENT_IP_CHANGE) {