summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2014-03-13 18:42:56 +0100
committerTom Gundersen <teg@jklm.no>2014-03-14 12:44:17 +0100
commit2a1763edfbdb95be643d595afbcc64f3fc092e46 (patch)
tree417d057e92d1852d1dc6ab1d2e31dacca5da1d0a
parent7947952edea208f004d48e978a9fc35e6ed4ab8c (diff)
networkd: lease - store (up to) one dhcp lease file per interface
This removes an accidentally left-over test fragment.
-rw-r--r--src/network/networkd-link.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/network/networkd-link.c b/src/network/networkd-link.c
index fdc351fed3..39cef2254c 100644
--- 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)