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.
This commit is contained in:
Thomas Haller
2015-03-02 20:19:16 +01:00
parent 9f2f751349
commit 974546d9c9
3 changed files with 0 additions and 21 deletions

View File

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

View File

@@ -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;
}

View File

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