Skip to content

Commit

Permalink
- Fix link of unbound-dnstap-socket without openssl.
Browse files Browse the repository at this point in the history
  • Loading branch information
wcawijngaards committed Jul 23, 2024
1 parent 671e115 commit 83e6977
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dnstap/unbound-dnstap-socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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)
Expand All @@ -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));
Expand Down Expand Up @@ -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;
Expand All @@ -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));
Expand Down
1 change: 1 addition & 0 deletions doc/Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 83e6977

Please sign in to comment.