"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/lib/ares_process.c" between
c-ares-1.17.1.tar.gz and c-ares-1.17.2.tar.gz

About: c-ares is a C library for asynchronous DNS requests (including name resolves).

ares_process.c  (c-ares-1.17.1):ares_process.c  (c-ares-1.17.2)
skipping to change at line 35 skipping to change at line 35
#endif #endif
#ifdef HAVE_NETINET_TCP_H #ifdef HAVE_NETINET_TCP_H
# include <netinet/tcp.h> # include <netinet/tcp.h>
#endif #endif
#ifdef HAVE_NETDB_H #ifdef HAVE_NETDB_H
# include <netdb.h> # include <netdb.h>
#endif #endif
#ifdef HAVE_ARPA_INET_H #ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h> # include <arpa/inet.h>
#endif #endif
#ifdef HAVE_ARPA_NAMESER_H
# include <arpa/nameser.h>
#endif
#ifdef HAVE_ARPA_NAMESER_COMPAT_H
# include <arpa/nameser_compat.h>
#endif
#include "nameser.h" #include "ares_nameser.h"
#ifdef HAVE_STRINGS_H #ifdef HAVE_STRINGS_H
# include <strings.h> # include <strings.h>
#endif #endif
#ifdef HAVE_SYS_IOCTL_H #ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h> # include <sys/ioctl.h>
#endif #endif
#ifdef NETWARE #ifdef NETWARE
# include <sys/filio.h> # include <sys/filio.h>
#endif #endif
skipping to change at line 612 skipping to change at line 606
query = q; query = q;
break; break;
} }
} }
if (!query) if (!query)
return; return;
packetsz = PACKETSZ; packetsz = PACKETSZ;
/* If we use EDNS and server answers with FORMERR without an OPT RR, the proto col /* If we use EDNS and server answers with FORMERR without an OPT RR, the proto col
* extension is not understood by the responder. We must retry the query * extension is not understood by the responder. We must retry the query
* without EDNS enabled. * without EDNS enabled. */
*/
if (channel->flags & ARES_FLAG_EDNS) if (channel->flags & ARES_FLAG_EDNS)
{ {
packetsz = channel->ednspsz; packetsz = channel->ednspsz;
if (rcode == FORMERR && has_opt_rr(abuf, alen) != 1) if (rcode == FORMERR && has_opt_rr(abuf, alen) != 1)
{ {
int qlen = (query->tcplen - 2) - EDNSFIXEDSZ; int qlen = (query->tcplen - 2) - EDNSFIXEDSZ;
channel->flags ^= ARES_FLAG_EDNS; channel->flags ^= ARES_FLAG_EDNS;
query->tcplen -= EDNSFIXEDSZ; query->tcplen -= EDNSFIXEDSZ;
query->qlen -= EDNSFIXEDSZ; query->qlen -= EDNSFIXEDSZ;
query->tcpbuf[0] = (unsigned char)((qlen >> 8) & 0xff); query->tcpbuf[0] = (unsigned char)((qlen >> 8) & 0xff);
 End of changes. 3 change blocks. 
9 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)