lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [bug #45004] valid messages are handled as invalid in dns_r


From: Sandra
Subject: [lwip-devel] [bug #45004] valid messages are handled as invalid in dns_recv
Date: Sun, 03 May 2015 17:37:35 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0

URL:
  <http://savannah.nongnu.org/bugs/?45004>

                 Summary: valid messages are handled as invalid in dns_recv
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: blindcarboncopy
            Submitted on: So 03 Mai 2015 17:37:33 GMT
                Category: DNS
                Severity: 3 - Normal
              Item Group: Faulty Behaviour
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 
            lwIP version: 1.4.1

    _______________________________________________________

Details:

Hallo,

the following check is done:
  /* is the dns message big enough ? */
  if (p->tot_len < (SIZEOF_DNS_HDR + SIZEOF_DNS_QUERY + SIZEOF_DNS_ANSWER   ))
{
    LWIP_DEBUGF(DNS_DEBUG, ("dns_recv: pbuf too small\n"));
    /* free pbuf and return */
    goto memerr;
  }

This works with the standard DNS Server set in dns_init.
But when I select my DNS server it doesn't work as soon as a domain name can
not be resolved. This is because the selected  DNS-server does only send
24byte (tot_len) when there is no valid server found. In my opinion this is
standard conform since ANCOUNT in the DNS message is 0. 

Since the message is discarded without setting pEntry->state =
DNS_STATE_UNUSED (memerr), all entries in dns_table are soon in
DNS_STATE_ASKING. No more DNS queries are giong out.

Here's the response of the DNS-Server (it is the address of my Cisco router):
ID = 0x0001
FLAGS = 0x8183
QDCOUNT = 0x0001
ANCOUNT = 0x0000
..

I did the follwing change. Then it works with my DNS Server also:
  if (p->tot_len < (SIZEOF_DNS_HDR + SIZEOF_DNS_QUERY    )) {

Hope this makes sense.

Best regards,
Sandra




    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?45004>

_______________________________________________
  Nachricht gesendet von/durch Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]