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:
7947952
)
networkd: lease - store (up to) one dhcp lease file per interface
author
Tom Gundersen
<teg@jklm.no>
Thu, 13 Mar 2014 17:42:56 +0000
(18:42 +0100)
committer
Tom Gundersen
<teg@jklm.no>
Fri, 14 Mar 2014 11:44:17 +0000
(12:44 +0100)
This removes an accidentally left-over test fragment.
src/network/networkd-link.c
patch
|
blob
|
history
diff --git
a/src/network/networkd-link.c
b/src/network/networkd-link.c
index
fdc351f
..
39cef22
100644
(file)
--- a/
src/network/networkd-link.c
+++ b/
src/network/networkd-link.c
@@
-1383,7
+1383,12
@@
int link_save(Link *link) {
link_state_to_string(link->state));
if (link->dhcp_lease) {
- const char *lease_file = "/run/systemd/network/leases/test.lease";
+ char *lease_file;
+
+ r = asprintf(&lease_file, "/run/systemd/network/leases/%u",
+ (unsigned) link->ifindex);
+ if (r < 0)
+ return r;
r = dhcp_lease_save(link->dhcp_lease, lease_file);
if (r < 0)