Skip to content

Commit 9647db8

Browse files
jukkaraescolar
authored andcommitted
net: dns: Avoid superfluous error message
If we have configured the DNS dispatcher to be only as a responder but receive a query response, or if we are only as a resolver but receive a query, then the dispatcher just ignores the packet and returns -ENOENT. Unfortunately we print an error message in this case [00:10:18.818,000] <err> net_dns_dispatcher: DNS recv error (-2) which is totally unnecessary and causes confusion so do not print an error message in this case. Signed-off-by: Jukka Rissanen <[email protected]>
1 parent d0474ce commit 9647db8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/net/lib/dns/dispatcher.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ void dns_dispatcher_svc_handler(struct k_work *work)
161161
int ret;
162162

163163
ret = recv_data(pev);
164-
if (ret < 0 && ret != DNS_EAI_ALLDONE) {
164+
if (ret < 0 && ret != DNS_EAI_ALLDONE && ret != -ENOENT) {
165165
NET_ERR("DNS recv error (%d)", ret);
166166
}
167167
}

0 commit comments

Comments
 (0)