diff --git a/CHANGES b/CHANGES index ee191e4..78cbc47 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,6 @@ +1.14 + - Set TCP_NODELAY on the whois socket + 1.13 (2024-05-01) - Fixed a bug for Mac users by removing sx_maxsockbuf() diff --git a/Makefile.am b/Makefile.am index a51836a..1ab3624 100644 --- a/Makefile.am +++ b/Makefile.am @@ -36,8 +36,8 @@ maintainer-clean-local: check: ./bgpq4 -v @echo - -@if [ -s /etc/resolv.conf ]; then \ - ./bgpq4 -6 AS15562:AS-SNIJDERS | grep 2001:67c:208c::; \ + -if [ -s /etc/resolv.conf ]; then \ + ./bgpq4 -ddd -6 AS15562:AS-SNIJDERS ; \ else \ echo "No or empty /etc/resolv.conf, skipping online test"; \ fi diff --git a/expander.c b/expander.c index ca424d9..f537046 100644 --- a/expander.c +++ b/expander.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -1034,7 +1035,7 @@ bgpq_expand(struct bgpq_expander *b) struct addrinfo hints, *res = NULL, *rp; struct linger sl; struct asn_entry *asne; - int fd = -1, err, ret, aquery = 0; + int fd = -1, err, ret, aquery = 0, nodelay = 1; int slen; sl.l_onoff = 1; @@ -1075,6 +1076,11 @@ bgpq_expand(struct bgpq_expander *b) continue; } + if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &nodelay, + sizeof(nodelay)) == -1) + SX_DEBUG(debug_expander, "Unable to set TCP_NODELAY on" + " socket: %s\n", strerror(errno)); + break; }