summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2015-03-02 20:19:16 +0100
committerThomas Haller <thaller@redhat.com>2015-03-03 11:19:22 +0100
commit974546d9c9f984ef77cc36fc626e1aa1743ebd19 (patch)
tree6d0a5b7d3f7e5e069ce594ea2d5c93b6839f1736
parent9f2f751349a1e32ece34739ad28becd4cf62679a (diff)
downloadNetworkManager-974546d9c9f984ef77cc36fc626e1aa1743ebd19.tar.gz
dhcp: remove sd_dhcp6_client_set_ifname() function
This function was added to inject the ifname to the dhcp6 client. As dhcp_identifier_set_iaid() now looks up the name itself by calling if_indextoname(), this is no longer needed.
-rw-r--r--src/dhcp-manager/nm-dhcp-systemd.c6
-rw-r--r--src/dhcp-manager/systemd-dhcp/src/libsystemd-network/sd-dhcp6-client.c14
-rw-r--r--src/dhcp-manager/systemd-dhcp/src/systemd/sd-dhcp6-client.h1
3 files changed, 0 insertions, 21 deletions
diff --git a/src/dhcp-manager/nm-dhcp-systemd.c b/src/dhcp-manager/nm-dhcp-systemd.c
index 1ea836e586..de5bf2a9be 100644
--- a/src/dhcp-manager/nm-dhcp-systemd.c
+++ b/src/dhcp-manager/nm-dhcp-systemd.c
@@ -746,12 +746,6 @@ ip6_start (NMDhcpClient *client,
goto error;
}
- r = sd_dhcp6_client_set_ifname (priv->client6, iface);
- if (r < 0) {
- nm_log_warn (LOGD_DHCP6, "(%s): failed to set DHCP ifname (%d)", iface, r);
- goto error;
- }
-
r = sd_dhcp6_client_set_callback (priv->client6, dhcp6_event_cb, client);
if (r < 0) {
nm_log_warn (LOGD_DHCP6, "(%s): failed to set DHCP callback (%d)", iface, 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..3687abcbef 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
@@ -52,7 +52,6 @@ struct sd_dhcp6_client {
uint8_t mac_addr[MAX_MAC_ADDR_LEN];
size_t mac_addr_len;
uint16_t arp_type;
- char ifname[IFNAMSIZ];
DHCP6IA ia_na;
be32_t transaction_id;
usec_t transaction_start;
@@ -1251,16 +1250,3 @@ int sd_dhcp6_client_new(sd_dhcp6_client **ret)
return 0;
}
-/*******************************************/
-/* NetworkManager additions */
-
-int sd_dhcp6_client_set_ifname(sd_dhcp6_client *client, const char *ifname)
-{
- assert_return(client, -EINVAL);
- assert_return(ifname, -EINVAL);
- assert_return(strlen (ifname) < sizeof (client->ifname), -EINVAL);
-
- strcpy(client->ifname, ifname);
- return 0;
-}
-
diff --git a/src/dhcp-manager/systemd-dhcp/src/systemd/sd-dhcp6-client.h b/src/dhcp-manager/systemd-dhcp/src/systemd/sd-dhcp6-client.h
index 3d38671bcd..e2646cbbc4 100644
--- a/src/dhcp-manager/systemd-dhcp/src/systemd/sd-dhcp6-client.h
+++ b/src/dhcp-manager/systemd-dhcp/src/systemd/sd-dhcp6-client.h
@@ -54,7 +54,6 @@ int sd_dhcp6_client_set_information_request(sd_dhcp6_client *client,
bool enabled);
int sd_dhcp6_client_get_information_request(sd_dhcp6_client *client,
bool *enabled);
-int sd_dhcp6_client_set_ifname(sd_dhcp6_client *client, const char *ifname);
int sd_dhcp6_client_set_request_option(sd_dhcp6_client *client,
uint16_t option);