lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #46071] Logic error in line 1473 in dns.c


From: April M
Subject: [lwip-devel] [bug #46071] Logic error in line 1473 in dns.c
Date: Tue, 29 Sep 2015 06:28:09 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36

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

                 Summary: Logic error in line 1473 in dns.c
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: april_m
            Submitted on: Tue 29 Sep 2015 06:28:07 AM 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:

if ((IP_IS_V6(addr) && (dns_addrtype != LWIP_DNS_ADDRTYPE_IPV4))||
!(IP_IS_V6(addr) && (dns_addrtype != LWIP+DNS_ADDRTYPE_IPV6)))
--

should be change to 

if ((IP_IS_V6(addr) && (dns_addrtype != LWIP_DNS_ADDRTYPE_IPV4))||
(!IP_IS_V6(addr) && (dns_addrtype != LWIP+DNS_ADDRTYPE_IPV6)))
--

The '!' should be inside the brackets. 

Otherwise, when querying IPv4 dot string such as "12.3.3.4" with ai_family to
be AF_INET6, it'll return successful. And in fact, it should return failure.




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

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