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

Submitter:  Cui hengbin <phant>
Submitted:  Tue 18 Mar 2008 12:26:45 AM UTC
   
 
Category:  sockets/netconn Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Wont Fix
Privacy:  Public Assigned to:  jifl
Open/Closed:  Closed Planned 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>
Group Member
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>

 

(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 jifl (Posted a comment)
  • -email is unavailable- added by phant (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
    2008-03-19 jifl StatusNone Wont Fix
        Assigned toNone jifl
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code