buglwIP - A Lightweight TCP/IP stack - Bugs: bug #22647, lwip_lwip_getaddrinfo problem

 
 

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

bug #22647: lwip_lwip_getaddrinfo problem

Submitted by:  Cui hengbin <phant>
Submitted on:  Tue 18 Mar 2008 12:26:45 AM UTC  
 
Category: sockets/netconnSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Wont Fix
Privacy: PublicAssigned to: Jonathan Larmour <jifl>
Open/Closed: ClosedPlanned Release: None
lwIP version: None

Wed 19 Mar 2008 12:19:01 AM UTC, comment #2:

Ok,Thanks,you can close this problem.

Cui hengbin <phant>
Tue 18 Mar 2008 09:32:26 AM UTC, comment #1:

What is implemented presently is self-consistent but not complete. Completeness is not always desired for lwIP and the current getaddrinfo implementation is nice and simple. What you want appears to be the implementation of the AI_PASSIVE flag (see http://www.opengroup.org/onlinepubs/009695399/functions/getaddrinfo.html ).

We don't claim to give perfect compliance and there's no stronger argument for AI_PASSIVE than any other AI flag, and this will just make the implementation bigger.

Since you're the one calling it with a nodename of NULL, I think you should just handle it in your application - e.g. calling:
memset(&res->ai_addr->sin_addr, 0, sizeof(struct in_addr));

Jonathan Larmour <jifl>
Project MemberIn charge of this item.
Tue 18 Mar 2008 12:26:45 AM UTC, original submission:

Hi All:
when i use "getaddrinfo(NULL, port, &hints, &res))" when
"(bind(*sock, res->ai_addr, res->ai_addrlen)",I find the port isn't opened. I find in the lwip_getaddrinfo's code as follow:

...
if (nodename != NULL) {
/* service location specified, try to resolve */
err = netconn_gethostbyname(nodename, &addr);
if (err != ERR_OK) {
return EAI_FAIL;
}
} else {
/* service location specified, use loopback address */
addr.addr = INADDR_LOOPBACK;
}
...

the address is loopback'address "127.0.0.1",but i don't enable the loopback ,can I change it to "IP_ADDR_ANY"?

Cui hengbin <phant>

 

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 jifl (Posted a comment)
  • -unavailable- added by phant (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 19 Mar 2008 10:12:50 AM UTCjiflStatusNone=>Wont Fix
      Assigned toNone=>jifl
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1