From: Marcel Holtmann Date: Thu, 29 Jul 2010 22:32:15 +0000 (-0700) Subject: Add domain name support to DHCP plugin X-Git-Tag: 0.56~59 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1033834b232ba362a3ea0419492da6b4524513ce;p=platform%2Fupstream%2Fconnman.git Add domain name support to DHCP plugin --- diff --git a/plugins/dhcp.c b/plugins/dhcp.c index 0ee0cb7..be1e274 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);