diff options
author | Tom Gundersen <teg@jklm.no> | 2014-03-03 17:13:59 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2014-03-03 17:18:22 +0100 |
commit | 8e34a618e2a67e22250247956697fe27c14c83c8 (patch) | |
tree | f61a736ace20206f2383aa6b723b598dec98842f /src/libsystemd-network/sd-dhcp-client.c | |
parent | 0ad853bc06dea1db5740caf59f404d274fa5e3c9 (diff) |
sd-dhcp-lease: add sd_dhcp_lease_get_next_server()
Diffstat (limited to 'src/libsystemd-network/sd-dhcp-client.c')
-rw-r--r-- | src/libsystemd-network/sd-dhcp-client.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index 1f676ccb65..b6810a9efe 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -587,6 +587,8 @@ static int client_handle_offer(sd_dhcp_client *client, DHCPMessage *offer, if (r != DHCP_OFFER) return -ENOMSG; + lease->next_server = offer->siaddr; + lease->address = offer->yiaddr; if (lease->address == INADDR_ANY || @@ -621,6 +623,8 @@ static int client_handle_ack(sd_dhcp_client *client, DHCPMessage *ack, if (r != DHCP_ACK) return -ENOMSG; + lease->next_server = ack->siaddr; + lease->address = ack->yiaddr; if (lease->address == INADDR_ANY || |