summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authoranton <anton@cvs.openbsd.org>2021-01-06 11:42:15 +0000
committeranton <anton@cvs.openbsd.org>2021-01-06 11:42:15 +0000
commitebc14dd7448b2aca4056a5552e1e013a0dd92ba9 (patch)
treeea61c606f301c5eb94eb8fa4a8baee96c4314b08 /usr.sbin
parent327f41b01de94695f278607684ba21f449cb244d (diff)
do not call log_addr() when the address is NULL
ok florian@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/unbound/util/netevent.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/unbound/util/netevent.c b/usr.sbin/unbound/util/netevent.c
index 8bbad15920a..2577af12bc8 100644
--- a/usr.sbin/unbound/util/netevent.c
+++ b/usr.sbin/unbound/util/netevent.c
@@ -379,8 +379,9 @@ comm_point_send_udp_msg(struct comm_point *c, sldns_buffer* packet,
if(!udp_send_errno_needs_log(addr, addrlen))
return 0;
verbose(VERB_OPS, "sendto failed: %s", sock_strerror(errno));
- log_addr(VERB_OPS, "remote address is",
- (struct sockaddr_storage*)addr, addrlen);
+ if(addr)
+ log_addr(VERB_OPS, "remote address is",
+ (struct sockaddr_storage*)addr, addrlen);
return 0;
} else if((size_t)sent != sldns_buffer_remaining(packet)) {
log_err("sent %d in place of %d bytes",