From ddf23f3167e91027675fdb05addec84bc83cbfb9 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 27 Apr 2017 15:47:03 +0300 Subject: [PATCH] samples: net: dns_resolve: Clarify that DNS queries aren't immediate The sample in its default configuration waits for DNS server configuration via IPv4 or IPv6 specific means. Until this information is receives, DNS querying won't even start. Make diagnostic messages explicit of this fact, because if user doesn't have required services available in the network, the sample will appear to just hang. Jira: ZEP-2061 Change-Id: I56a5b7354a2d1239a35d8334ed95a15ebd19254f Signed-off-by: Paul Sokolovsky --- samples/net/dns_resolve/src/main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/samples/net/dns_resolve/src/main.c b/samples/net/dns_resolve/src/main.c index 04bab391819..6c7bbce6ab5 100644 --- a/samples/net/dns_resolve/src/main.c +++ b/samples/net/dns_resolve/src/main.c @@ -137,7 +137,7 @@ static void ipv4_addr_add_handler(struct net_mgmt_event_callback *cb, static void setup_dhcpv4(struct net_if *iface) { - NET_INFO("Running dhcpv4 client..."); + NET_INFO("Getting IPv4 address via DHCP before issuing DNS query"); net_mgmt_init_event_callback(&mgmt4_cb, ipv4_addr_add_handler, NET_EVENT_IPV4_ADDR_ADD); @@ -257,6 +257,9 @@ static void setup_ipv6(struct net_if *iface) NET_INFO("IPv6 address: %s", net_addr_ntop(AF_INET6, &addr, hr_addr, NET_IPV6_ADDR_LEN)); + + NET_INFO("Waiting for IPv6 default router notification " + "before issuing DNS query"); } #else