]> git.ipfire.org Git - thirdparty/ldns.git/commitdiff
* Fix that ldns-testns ignores sigpipe.
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 1 Mar 2019 12:26:48 +0000 (13:26 +0100)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Fri, 1 Mar 2019 12:26:48 +0000 (13:26 +0100)
Changelog
examples/ldns-testns.c

index 682314487176a899e5a63a3c68094c81de8554df..808325d6674b3fd0c4350adadf9784940bff45f8 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -31,6 +31,7 @@
        * ED25519 and ED448 support.
        * ldns-notify: can have IPv6 address as argument.
        * Fix time sensitive TSIG compare vulnerability.
+       * Fix that ldns-testns ignores sigpipe.
 
 1.7.0  2016-12-20
        * Fix lookup of relative names in ldns_resolver_search.
index 885453d3dcda1268830d2b868c41fda63de5dbbf..144b945717598c3301072920444d5e075eae8af9 100644 (file)
@@ -147,6 +147,7 @@ struct sockaddr_storage;
 #include <netinet/igmp.h>
 #endif
 #include <errno.h>
+#include <signal.h>
 
 #define INBUF_SIZE 4096         /* max size for incoming queries */
 #define DEFAULT_PORT 53                /* default if no -p port is specified */
@@ -499,6 +500,9 @@ main(int argc, char **argv)
        log_msg("Reading datafile %s\n", datafile);
        entries = read_datafile(datafile, 0);
 
+#ifdef SIGPIPE
+        (void)signal(SIGPIPE, SIG_IGN);
+#endif
 #ifdef USE_WINSOCK
        if(WSAStartup(MAKEWORD(2,2), &wsa_data) != 0)
                error("WSAStartup failed\n");