From: W.C.A. Wijngaards Date: Tue, 23 Jul 2024 13:06:54 +0000 (+0200) Subject: - Fix link of unbound-dnstap-socket without openssl. X-Git-Tag: release-1.21.0rc1~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=83e6977f063de41b3b01e19ae0588ee9ead8a419;p=thirdparty%2Funbound.git - Fix link of unbound-dnstap-socket without openssl. --- diff --git a/dnstap/unbound-dnstap-socket.c b/dnstap/unbound-dnstap-socket.c index 7772e763d..a437b6296 100644 --- a/dnstap/unbound-dnstap-socket.c +++ b/dnstap/unbound-dnstap-socket.c @@ -822,7 +822,6 @@ static int reply_with_accept(struct tap_data* data) { #ifdef USE_DNSTAP /* len includes the escape and framelength */ - int r; size_t len = 0; void* acceptframe = fstrm_create_control_frame_accept( DNSTAP_CONTENT_TYPE, &len); @@ -833,6 +832,8 @@ static int reply_with_accept(struct tap_data* data) fd_set_block(data->fd); if(data->ssl) { +#ifdef HAVE_SSL + int r; if((r=SSL_write(data->ssl, acceptframe, len)) <= 0) { int r2; if((r2=SSL_get_error(data->ssl, r)) == SSL_ERROR_ZERO_RETURN) @@ -843,6 +844,7 @@ static int reply_with_accept(struct tap_data* data) free(acceptframe); return 0; } +#endif } else { if(send(data->fd, acceptframe, len, 0) == -1) { log_err("send failed: %s", sock_strerror(errno)); @@ -878,6 +880,7 @@ static int reply_with_finish(struct tap_data* data) fd_set_block(data->fd); if(data->ssl) { +#ifdef HAVE_SSL int r; if((r=SSL_write(data->ssl, finishframe, len)) <= 0) { int r2; @@ -889,6 +892,7 @@ static int reply_with_finish(struct tap_data* data) free(finishframe); return 0; } +#endif } else { if(send(data->fd, finishframe, len, 0) == -1) { log_err("send failed: %s", sock_strerror(errno)); diff --git a/doc/Changelog b/doc/Changelog index bbbbcb5b5..16f9a2769 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -10,6 +10,7 @@ - Fix to have empty definition when not supported for weak attribute. - Fix uninitialized variable warning in create_tcp_accept_sock. - Fix link of dnstap without openssl. + - Fix link of unbound-dnstap-socket without openssl. 19 July 2024: Wouter - Add dnstap-sample-rate that logs only 1/N messages, for high volume