This is the mail archive of the ecos-bugs@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug 1000203] New: dns client retries with bad data if it receives a stale response


http://bugs.ecos.sourceware.org/show_bug.cgi?id=1000203

           Summary: dns client retries with bad data if it receives a stale
                    response
           Product: eCos
           Version: 2.0
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: normal
         Component: TCPIP
        AssignedTo: gary@mlbassoc.com
        ReportedBy: sbhandari@nexthop.com
         QAContact: ecos-bugs@sources.redhat.com


---------- excerpt from dns.c; problem marked with <========

static int
send_recv(char * msg, int len, int msglen)
{
    struct dns_header *dns_hdr;
    struct timeval timeout;

... snip ...

        if (ret == 1) {
            ret = read(s, msg, msglen);
            if (ret < 0) {
                ret = -1;
                break;
            }

            /* Reply to an old query. Ignore it */
            if (ntohs(dns_hdr->id) != (id-1)) {
                continue; <======== will retry write; but msg now contains the
                          <========= stale response just received
            }



------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]