From: W.C.A. Wijngaards Date: Fri, 1 Mar 2019 12:26:48 +0000 (+0100) Subject: * Fix that ldns-testns ignores sigpipe. X-Git-Tag: release-1.7.1-rc1~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23f8bdb40c7feae0cc3e5e1e75126065da4c69c8;p=thirdparty%2Fldns.git * Fix that ldns-testns ignores sigpipe. --- diff --git a/Changelog b/Changelog index 68231448..808325d6 100644 --- 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. diff --git a/examples/ldns-testns.c b/examples/ldns-testns.c index 885453d3..144b9457 100644 --- a/examples/ldns-testns.c +++ b/examples/ldns-testns.c @@ -147,6 +147,7 @@ struct sockaddr_storage; #include #endif #include +#include #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");