diff options
author | Thomas Haller <thaller@redhat.com> | 2015-02-02 10:09:48 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2015-03-02 20:06:15 +0100 |
commit | 44f8378ef20310eafe0bb97a4cd48bbbf09c2e2b (patch) | |
tree | 69110441f970eb5d70b557ff56e90d38fa34f3f9 | |
parent | 76e13a3cc3046b7ff35c30e50b8224bdfc3b4280 (diff) | |
download | NetworkManager-origin/th/systemd-dhcp-integration-1.tar.gz |
dhcp: replace dhcp_identifier_set_iaid() by dhcp_identifier_set_iaid_from_name()origin/th/systemd-dhcp-integration-1
3 files changed, 8 insertions, 2 deletions
diff --git a/src/dhcp-manager/nm-dhcp-systemd.c b/src/dhcp-manager/nm-dhcp-systemd.c index 1ea836e586..25ae5b4798 100644 --- a/src/dhcp-manager/nm-dhcp-systemd.c +++ b/src/dhcp-manager/nm-dhcp-systemd.c @@ -567,6 +567,12 @@ ip4_start (NMDhcpClient *client, const char *dhcp_anycast_addr, const char *last goto error; } + r = sd_dhcp_client_set_ifname (priv->client4, iface); + if (r < 0) { + nm_log_warn (LOGD_DHCP6, "(%s): failed to set DHCP ifname (%d)", iface, r); + goto error; + } + r = sd_dhcp_client_set_callback (priv->client4, dhcp_event_cb, client); if (r < 0) { nm_log_warn (LOGD_DHCP4, "(%s): failed to set DHCP callback (%d)", iface, r); diff --git a/src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp-client.c b/src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp-client.c index ef334819a3..d2c5dadebb 100644 --- a/src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp-client.c +++ b/src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp-client.c @@ -469,7 +469,7 @@ static int client_message_init(sd_dhcp_client *client, DHCPPacket **ret, client->client_id.type = 255; - r = dhcp_identifier_set_iaid(client->index, client->mac_addr, client->mac_addr_len, &client->client_id.ns.iaid); + r = dhcp_identifier_set_iaid_from_name(client->ifname, client->mac_addr, client->mac_addr_len, &client->client_id.ns.iaid); if (r < 0) return r; diff --git a/src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp6-client.c b/src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp6-client.c index e6f963667f..3e6a964f7c 100644 --- a/src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp6-client.c +++ b/src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp6-client.c @@ -635,7 +635,7 @@ static int client_ensure_iaid(sd_dhcp6_client *client) { if (client->ia_na.id) return 0; - r = dhcp_identifier_set_iaid(client->index, client->mac_addr, client->mac_addr_len, &client->ia_na.id); + r = dhcp_identifier_set_iaid_from_name(client->ifname, client->mac_addr, client->mac_addr_len, &client->ia_na.id); if (r < 0) return r; |