[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-devel] [bug #61230] Improve Dual-Stack support for getaddrinfo, re
From: |
Simon Kueppers |
Subject: |
[lwip-devel] [bug #61230] Improve Dual-Stack support for getaddrinfo, return both IPv4 and IPv6 results |
Date: |
Wed, 6 Oct 2021 15:53:40 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:89.0) Gecko/20100101 Firefox/89.0 |
Follow-up Comment #2, bug #61230 (project lwip):
Some further notes regarding my first post:
_getaddrinfo_ in server applications (AI_PASSIVE) now works exactly as it
should. The order of AF_INET/AF_INET6 in dual-stack applications can be set
with _LWIP_DNS_API_FAMILIES_LOCAL _(netdb.h).
In client applications, I now implemented the version where two successive DNS
calls to the DNS server are done, when no family is specified in the hints and
lwIP is compiled as dual-stack.
This is wasteful, yes, but I think this is only an edge case. Additionally,
this is something that a more-aware version of the DNS api could work around
by caching both IPv4 and IPv6 addresses when a request to the DNS server is
made.
The order of returned IP addresses can be set with _LWIP_DNS_API_FAMILIES_
(netdb.h)
In the attachment is now the Python script that I used to create the reference
file. I also added the C-code I used to print the results from lwIP.
(file #52061, file #52062)
_______________________________________________________
Additional Item Attachment:
File name: getaddrinfo.py Size:2 KB
<https://file.savannah.nongnu.org/file/getaddrinfo.py?file_id=52061>
File name: getaddrinfo.c Size:4 KB
<https://file.savannah.nongnu.org/file/getaddrinfo.c?file_id=52062>
_______________________________________________________
Reply to this item at:
<https://savannah.nongnu.org/bugs/?61230>
_______________________________________________
Message sent via Savannah
https://savannah.nongnu.org/