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:
b16492f
)
dhcp-identifier: create IAID even if no udev device can be found
author
Tom Gundersen
<teg@jklm.no>
Thu, 22 Jan 2015 20:18:30 +0000
(21:18 +0100)
committer
Tom Gundersen
<teg@jklm.no>
Thu, 22 Jan 2015 20:29:42 +0000
(21:29 +0100)
This is useful for testing.
src/libsystemd-network/dhcp-identifier.c
patch
|
blob
|
history
diff --git
a/src/libsystemd-network/dhcp-identifier.c
b/src/libsystemd-network/dhcp-identifier.c
index
5386dca
..
e4b0ce6
100644
(file)
--- a/
src/libsystemd-network/dhcp-identifier.c
+++ b/
src/libsystemd-network/dhcp-identifier.c
@@
-78,14
+78,13
@@
int dhcp_identifier_set_iaid(int ifindex, uint8_t *mac, size_t mac_len, uint32_t
sprintf(ifindex_str, "n%d", ifindex);
device = udev_device_new_from_device_id(udev, ifindex_str);
- if (!device)
- return -errno;
+ if (device) {
+ if (udev_device_get_is_initialized(device) <= 0)
+ /* not yet ready */
+ return -EBUSY;
- if (udev_device_get_is_initialized(device) <= 0)
- /* not yet ready */
- return -EBUSY;
-
- name = net_get_name(device);
+ name = net_get_name(device);
+ }
}
if (name)