summaryrefslogtreecommitdiffstats
path: root/lwip/src/core/ipv6/dhcp6.c
diff options
context:
space:
mode:
Diffstat (limited to 'lwip/src/core/ipv6/dhcp6.c')
-rw-r--r--lwip/src/core/ipv6/dhcp6.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/lwip/src/core/ipv6/dhcp6.c b/lwip/src/core/ipv6/dhcp6.c
index 7cf98a5..bcf5d20 100644
--- a/lwip/src/core/ipv6/dhcp6.c
+++ b/lwip/src/core/ipv6/dhcp6.c
@@ -451,7 +451,16 @@ dhcp6_msg_finalize(u16_t options_out_len, struct pbuf *p_out)
static void
dhcp6_information_request(struct netif *netif, struct dhcp6 *dhcp6)
{
- const u16_t requested_options[] = {DHCP6_OPTION_DNS_SERVERS, DHCP6_OPTION_DOMAIN_LIST, DHCP6_OPTION_SNTP_SERVERS};
+ const u16_t requested_options[] = {
+#if LWIP_DHCP6_PROVIDE_DNS_SERVERS
+ DHCP6_OPTION_DNS_SERVERS,
+ DHCP6_OPTION_DOMAIN_LIST
+#endif
+#if LWIP_DHCP6_GET_NTP_SRV
+ , DHCP6_OPTION_SNTP_SERVERS
+#endif
+ };
+
u16_t msecs;
struct pbuf *p_out;
u16_t options_out_len;
@@ -527,7 +536,7 @@ dhcp6_handle_config_reply(struct netif *netif, struct pbuf *p_msg_in)
u16_t idx;
u8_t n;
- memset(&dns_addr, 0, sizeof(dns_addr));
+ ip_addr_set_zero_ip6(&dns_addr);
dns_addr6 = ip_2_ip6(&dns_addr);
for (n = 0, idx = op_start; (idx < op_start + op_len) && (n < LWIP_DHCP6_PROVIDE_DNS_SERVERS);
n++, idx += sizeof(struct ip6_addr_packed)) {