summaryrefslogtreecommitdiff
path: root/src/network/networkd-dhcp4.c
diff options
context:
space:
mode:
authorTom Gundersen <teg@jklm.no>2015-10-01 22:29:50 +0200
committerTom Gundersen <teg@jklm.no>2015-10-30 12:32:49 +0100
commit0bc70f1d9c5453ba614ec0ed041dc30b9cd52071 (patch)
treed20f295d7f498f754a7cd4c20a05b4da8615a314 /src/network/networkd-dhcp4.c
parentc4a03a5669af8abd752bff9084c29683ae78e11e (diff)
networkd: link - (de)serialize IPv4LL and DHCPv4 addresses
This initializes the clients to try rebinding the preexisting addresses before doing anything else.
Diffstat (limited to 'src/network/networkd-dhcp4.c')
-rw-r--r--src/network/networkd-dhcp4.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c
index 05a16f4033..b58fc5808c 100644
--- a/src/network/networkd-dhcp4.c
+++ b/src/network/networkd-dhcp4.c
@@ -533,9 +533,11 @@ int dhcp4_configure(Link *link) {
assert(link->network);
assert(link->network->dhcp & ADDRESS_FAMILY_IPV4);
- r = sd_dhcp_client_new(&link->dhcp_client);
- if (r < 0)
- return r;
+ if (!link->dhcp_client) {
+ r = sd_dhcp_client_new(&link->dhcp_client);
+ if (r < 0)
+ return r;
+ }
r = sd_dhcp_client_attach_event(link->dhcp_client, NULL, 0);
if (r < 0)