buglwIP - A Lightweight TCP/IP stack - Bugs: bug #28828, ip_addr.h some macro error

 
 

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

bug #28828: ip_addr.h some macro error

Submitted by:  hanhui <hanhui03>
Submitted on:  Sat 06 Feb 2010 03:13:10 PM UTC  
 
Category: IPv4Severity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

Mon 08 Feb 2010 12:25:16 PM UTC, comment #4:

Fixed, thanks for reporting.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Mon 08 Feb 2010 07:55:27 AM UTC, comment #3:

> the result of dns_gethostbyname() MUST be net byte order!


I know, you have written that in the original submission. What's not clear is what you meant by "the result is error", that's what I was asking for in comment #1.

I'll fix the macro and add htonl to IPADDR_LOOPBACK but I wanted to know if there's another error or not.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Mon 08 Feb 2010 07:32:41 AM UTC, comment #2:

the result of dns_gethostbyname() MUST be net byte order!

you can test with "localhost".

hanhui <hanhui03>
Mon 08 Feb 2010 07:24:59 AM UTC, comment #1:

Do you mean dns_gethostbyname() returns an error (an err_t != ERR_OK), or does it return ERR_OK, but the "resolved" IP address is not the one you expected (since htonl is missing)?

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Sat 06 Feb 2010 03:13:10 PM UTC, original submission:

macro ip_addr_set_zero and ip_addr_set_loopback should be:

#define ip_addr_set_zero(ipaddr) \
(ipaddr)->addr = htonl(IPADDR_ANY)

#define ip_addr_set_loopback(ipaddr) \
((ipaddr)->addr = htonl(IPADDR_LOOPBACK))

in function dns_gethostbyname(in dns.c), if hostname is "localhost", the result is error!

hanhui <hanhui03>

 

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 hanhui03 (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
    Mon 08 Feb 2010 12:25:16 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1