summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2017-04-27 15:47:03 +0300
committerJukka Rissanen <jukka.rissanen@linux.intel.com>2017-04-28 15:01:12 +0300
commitddf23f3167e91027675fdb05addec84bc83cbfb9 (patch)
tree5711238c4c3dc2b338509be2986309d5bd0522d6
parente4d8900cc6b29b7bbb88729fa7ec45a9b2deb161 (diff)
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 <paul.sokolovsky@linaro.org>
-rw-r--r--samples/net/dns_resolve/src/main.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/samples/net/dns_resolve/src/main.c b/samples/net/dns_resolve/src/main.c
index 04bab3918..6c7bbce6a 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