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

Submitter:  David Empson <dempson>
Submitted:  Thu 18 Nov 2010 09:58:04 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  goldsimon
Open/Closed:  Closed Planned 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>
Group administrator
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>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-11-20 goldsimon StatusNone Fixed
        Assigned toNone goldsimon
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code