buglwIP - A Lightweight TCP/IP stack - Bugs: bug #46071, Logic error in line 1473 in dns.c

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #46071: Logic error in line 1473 in dns.c

Submitted by:  April M <april_m>
Submitted on:  Tue 29 Sep 2015 06:28:07 AM UTC  
 
Category: DNSSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: 1.4.1

Wed 30 Sep 2015 11:36:32 AM UTC, comment #2:

Fixed, thanks for reporting.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Tue 29 Sep 2015 06:35:32 AM UTC, comment #1:

Actually the LwIP version is git head. The latest DNS.c

I don't know how to modify the LwIP version.

April M <april_m>
Tue 29 Sep 2015 06:28:07 AM UTC, original submission:

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.

April M <april_m>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by april_m (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 30 Sep 2015 11:36:32 AM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1