buglwIP - A Lightweight TCP/IP stack - Bugs: bug #31701, Error return value from...

 
 

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

bug #31701: Error return value from dns_gethostbyname() doesn't match documentation

Submitted by:  David Empson <dempson>
Submitted on:  Thu 18 Nov 2010 09:58:04 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

Sat 20 Nov 2010 04:40:50 PM UTC, comment #1:

Fixed by correcting return value in dns_gethostbyname(). Thanks for reporting.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Thu 18 Nov 2010 09:58:04 PM UTC, original submission:

The comments for netconn_gethostbyname() indicate that a return value of ERR_ARG is used for "dns client not initialized or invalid hostname".

The actual implementation in dns.c function dns_gethostbyname() is returning ERR_VAL if dns_init() was not called, or either the hostname or IP address pointer arguments are invalid.

I think dns_gethostbyname() should be corrected to return ERR_ARG instead of ERR_VAL for these errors.

It may also be worth listing the ERR_ARG return value in the comment block preceding dns_gethostbyname().

netconn_gethostbyname() can also return ERR_VAL for an timeout or other error from the DNS server, so at present this return value is ambiguous.

David Empson <dempson>

 

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 dempson (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
    Sat 20 Nov 2010 04:40:50 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1