projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acfbbf5
)
networkd: act on lease only if there is one
author
Umut Tezduyar Lindskog
<umut.tezduyar@axis.com>
Mon, 17 Feb 2014 20:16:53 +0000
(21:16 +0100)
committer
Tom Gundersen
<teg@jklm.no>
Mon, 17 Feb 2014 22:30:08 +0000
(23:30 +0100)
Interface could go down before acquiring a dhcp lease
src/network/networkd-link.c
patch
|
blob
|
history
diff --git
a/src/network/networkd-link.c
b/src/network/networkd-link.c
index
d83c4ce
..
9aca1b6
100644
(file)
--- 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) {