diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2010-07-29 15:32:15 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2010-07-29 15:32:15 -0700 |
commit | 1033834b232ba362a3ea0419492da6b4524513ce (patch) | |
tree | c6543f2e54ee0445ff522d3352c0f25ab68f01c6 | |
parent | fe57f3b830d591f0771229ae91f7eb04fdb9c3fb (diff) | |
download | connman-1033834b232ba362a3ea0419492da6b4524513ce.tar.gz connman-1033834b232ba362a3ea0419492da6b4524513ce.tar.bz2 connman-1033834b232ba362a3ea0419492da6b4524513ce.zip |
Add domain name support to DHCP plugin
-rw-r--r-- | plugins/dhcp.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/dhcp.c b/plugins/dhcp.c index 0ee0cb7f..be1e274c 100644 --- a/plugins/dhcp.c +++ b/plugins/dhcp.c @@ -88,6 +88,10 @@ static void lease_available_cb(GDHCPClient *dhcp_client, gpointer user_data) } g_free(nameservers); + option = g_dhcp_client_get_option(dhcp_client, G_DHCP_DOMAIN_NAME); + if (option != NULL) + connman_dhcp_set_value(dhcp, "Domainname", (char *) option->data); + option = g_dhcp_client_get_option(dhcp_client, G_DHCP_ROUTER); if (option != NULL) connman_dhcp_set_value(dhcp, "Gateway", (char *) option->data); @@ -122,6 +126,7 @@ static int dhcp_request(struct connman_dhcp *dhcp) g_dhcp_client_set_request(dhcp_client, G_DHCP_HOST_NAME); g_dhcp_client_set_request(dhcp_client, G_DHCP_SUBNET); g_dhcp_client_set_request(dhcp_client, G_DHCP_DNS_SERVER); + g_dhcp_client_set_request(dhcp_client, G_DHCP_DOMAIN_NAME); g_dhcp_client_set_request(dhcp_client, G_DHCP_NTP_SERVER); g_dhcp_client_set_request(dhcp_client, G_DHCP_ROUTER); |