]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix link of unbound-dnstap-socket without openssl.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 23 Jul 2024 13:06:54 +0000 (15:06 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 23 Jul 2024 13:06:54 +0000 (15:06 +0200)
dnstap/unbound-dnstap-socket.c
doc/Changelog

index 7772e763d069701a30ed054a0649c812d37632ed..a437b62967858979e6dd8b6dcb94e44ecd1379c7 100644 (file)
@@ -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));
index bbbbcb5b5d714926cf259455fb97178549ebb94f..16f9a276986b18d851031efd7730bb72cb2d33be 100644 (file)
@@ -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