From 475a695684d0a417a5705226d5d7110268c044f8 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Wed, 12 Jun 2013 14:43:24 +0300 Subject: [PATCH] dhcpv6: Send domain list option to server OPTION_DOMAIN_LIST(24) was not sent to server. --- gdhcp/client.c | 3 +++ gdhcp/gdhcp.h | 1 + src/dhcpv6.c | 30 ++++++++++++++++++------------ 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/gdhcp/client.c b/gdhcp/client.c index a41e167..bbd00c4 100644 --- a/gdhcp/client.c +++ b/gdhcp/client.c @@ -361,6 +361,9 @@ static void add_dhcpv6_request_options(GDHCPClient *dhcp_client, case G_DHCPV6_DNS_SERVERS: break; + case G_DHCPV6_DOMAIN_LIST: + break; + case G_DHCPV6_SNTP_SERVERS: break; diff --git a/gdhcp/gdhcp.h b/gdhcp/gdhcp.h index ba47eaf..4f0a16b 100644 --- a/gdhcp/gdhcp.h +++ b/gdhcp/gdhcp.h @@ -87,6 +87,7 @@ typedef enum { #define G_DHCPV6_STATUS_CODE 13 #define G_DHCPV6_RAPID_COMMIT 14 #define G_DHCPV6_DNS_SERVERS 23 +#define G_DHCPV6_DOMAIN_LIST 24 #define G_DHCPV6_SNTP_SERVERS 31 #define G_DHCPV6_ERROR_SUCCESS 0 diff --git a/src/dhcpv6.c b/src/dhcpv6.c index abeab0b..bff57d4 100644 --- a/src/dhcpv6.c +++ b/src/dhcpv6.c @@ -385,10 +385,11 @@ static int dhcpv6_info_request(struct connman_dhcpv6 *dhcp) g_dhcp_client_set_request(dhcp_client, G_DHCPV6_CLIENTID); g_dhcp_client_set_request(dhcp_client, G_DHCPV6_DNS_SERVERS); + g_dhcp_client_set_request(dhcp_client, G_DHCPV6_DOMAIN_LIST); g_dhcp_client_set_request(dhcp_client, G_DHCPV6_SNTP_SERVERS); - g_dhcpv6_client_set_oro(dhcp_client, 2, G_DHCPV6_DNS_SERVERS, - G_DHCPV6_SNTP_SERVERS); + g_dhcpv6_client_set_oro(dhcp_client, 3, G_DHCPV6_DNS_SERVERS, + G_DHCPV6_DOMAIN_LIST, G_DHCPV6_SNTP_SERVERS); g_dhcp_client_register_event(dhcp_client, G_DHCP_CLIENT_EVENT_INFORMATION_REQ, info_req_cb, dhcp); @@ -608,10 +609,11 @@ static int dhcpv6_rebind(struct connman_dhcpv6 *dhcp) g_dhcp_client_set_request(dhcp_client, G_DHCPV6_CLIENTID); g_dhcp_client_set_request(dhcp_client, G_DHCPV6_DNS_SERVERS); + g_dhcp_client_set_request(dhcp_client, G_DHCPV6_DOMAIN_LIST); g_dhcp_client_set_request(dhcp_client, G_DHCPV6_SNTP_SERVERS); - g_dhcpv6_client_set_oro(dhcp_client, 2, G_DHCPV6_DNS_SERVERS, - G_DHCPV6_SNTP_SERVERS); + g_dhcpv6_client_set_oro(dhcp_client, 3, G_DHCPV6_DNS_SERVERS, + G_DHCPV6_DOMAIN_LIST, G_DHCPV6_SNTP_SERVERS); g_dhcpv6_client_set_ia(dhcp_client, connman_network_get_index(dhcp->network), @@ -720,10 +722,11 @@ static int dhcpv6_request(struct connman_dhcpv6 *dhcp, g_dhcp_client_set_request(dhcp_client, G_DHCPV6_CLIENTID); g_dhcp_client_set_request(dhcp_client, G_DHCPV6_SERVERID); g_dhcp_client_set_request(dhcp_client, G_DHCPV6_DNS_SERVERS); + g_dhcp_client_set_request(dhcp_client, G_DHCPV6_DOMAIN_LIST); g_dhcp_client_set_request(dhcp_client, G_DHCPV6_SNTP_SERVERS); - g_dhcpv6_client_set_oro(dhcp_client, 2, G_DHCPV6_DNS_SERVERS, - G_DHCPV6_SNTP_SERVERS); + g_dhcpv6_client_set_oro(dhcp_client, 3, G_DHCPV6_DNS_SERVERS, + G_DHCPV6_DOMAIN_LIST, G_DHCPV6_SNTP_SERVERS); g_dhcpv6_client_get_timeouts(dhcp_client, &T1, &T2, NULL, NULL, NULL); g_dhcpv6_client_set_ia(dhcp_client, @@ -790,10 +793,11 @@ static int dhcpv6_renew(struct connman_dhcpv6 *dhcp) g_dhcp_client_set_request(dhcp_client, G_DHCPV6_CLIENTID); g_dhcp_client_set_request(dhcp_client, G_DHCPV6_SERVERID); g_dhcp_client_set_request(dhcp_client, G_DHCPV6_DNS_SERVERS); + g_dhcp_client_set_request(dhcp_client, G_DHCPV6_DOMAIN_LIST); g_dhcp_client_set_request(dhcp_client, G_DHCPV6_SNTP_SERVERS); - g_dhcpv6_client_set_oro(dhcp_client, 2, G_DHCPV6_DNS_SERVERS, - G_DHCPV6_SNTP_SERVERS); + g_dhcpv6_client_set_oro(dhcp_client, 3, G_DHCPV6_DNS_SERVERS, + G_DHCPV6_DOMAIN_LIST, G_DHCPV6_SNTP_SERVERS); g_dhcpv6_client_get_timeouts(dhcp_client, &T1, &T2, NULL, NULL, NULL); g_dhcpv6_client_set_ia(dhcp_client, @@ -1173,10 +1177,11 @@ static int dhcpv6_solicitation(struct connman_dhcpv6 *dhcp) g_dhcp_client_set_request(dhcp_client, G_DHCPV6_CLIENTID); g_dhcp_client_set_request(dhcp_client, G_DHCPV6_RAPID_COMMIT); g_dhcp_client_set_request(dhcp_client, G_DHCPV6_DNS_SERVERS); + g_dhcp_client_set_request(dhcp_client, G_DHCPV6_DOMAIN_LIST); g_dhcp_client_set_request(dhcp_client, G_DHCPV6_SNTP_SERVERS); - g_dhcpv6_client_set_oro(dhcp_client, 2, G_DHCPV6_DNS_SERVERS, - G_DHCPV6_SNTP_SERVERS); + g_dhcpv6_client_set_oro(dhcp_client, 3, G_DHCPV6_DNS_SERVERS, + G_DHCPV6_DOMAIN_LIST, G_DHCPV6_SNTP_SERVERS); ipconfig_ipv6 = __connman_service_get_ip6config(service); dhcp->use_ta = __connman_ipconfig_ipv6_privacy_enabled(ipconfig_ipv6); @@ -1277,10 +1282,11 @@ static int dhcpv6_confirm(struct connman_dhcpv6 *dhcp) g_dhcp_client_set_request(dhcp_client, G_DHCPV6_CLIENTID); g_dhcp_client_set_request(dhcp_client, G_DHCPV6_RAPID_COMMIT); g_dhcp_client_set_request(dhcp_client, G_DHCPV6_DNS_SERVERS); + g_dhcp_client_set_request(dhcp_client, G_DHCPV6_DOMAIN_LIST); g_dhcp_client_set_request(dhcp_client, G_DHCPV6_SNTP_SERVERS); - g_dhcpv6_client_set_oro(dhcp_client, 2, G_DHCPV6_DNS_SERVERS, - G_DHCPV6_SNTP_SERVERS); + g_dhcpv6_client_set_oro(dhcp_client, 3, G_DHCPV6_DNS_SERVERS, + G_DHCPV6_DOMAIN_LIST, G_DHCPV6_SNTP_SERVERS); ipconfig_ipv6 = __connman_service_get_ip6config(service); dhcp->use_ta = __connman_ipconfig_ipv6_privacy_enabled(ipconfig_ipv6); -- 2.7.4