1
0
mirror of https://github.com/systemd/systemd.git synced 2025-08-29 01:49:55 +03:00

networkd: lease - store (up to) one dhcp lease file per interface

This removes an accidentally left-over test fragment.
This commit is contained in:
Tom Gundersen
2014-03-13 18:42:56 +01:00
parent 7947952ede
commit 2a1763edfb

View File

@ -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)