buglwIP - A Lightweight TCP/IP stack - Bugs: bug #46079, DNS didn't try the second dns...

 
 

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

bug #46079: DNS didn't try the second dns server when the first one failed

Submitted by:  April M <april_m>
Submitted on:  Wed 30 Sep 2015 09:32:42 AM UTC  
 
Category: DNSSeverity: 3 - Normal
Item Group: Change RequestStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: git head

Wed 30 Sep 2015 12:41:06 PM UTC, comment #2:

I tried to set DNS_MAX_RETRIES to be 4 and 1, both have such problem. Didn't dig it further. :)

April M <april_m>
Wed 30 Sep 2015 12:23:34 PM UTC, comment #1:

Changes as suggested. Although the old code worked for me (what is your setting for DNS_MAX_RETRIES?), the suggested change looks better.

Thanks for the fix.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Wed 30 Sep 2015 09:32:42 AM UTC, original submission:

The logic in dns_check_entry() makes DNS only try one dns server.

It should be modified as below in "case DNS_STATE_ASKING" in line 1012 in dns.c:
1. remove the first "break;" in line 1020, which is below "entry->retries = 0;"

2. use "else" to wrap "entry->tmr = entry->retries;" in line 1032,as bellow:
if (++entry->retries == DNS_MAX_RETRIES)
{
...
}
else
{
/* wait longer for the next retry */
entry->tmr = entry->retries;
}

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 12:23:34 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1