summaryrefslogtreecommitdiff
path: root/tests/unix/extra_coverage.py
diff options
context:
space:
mode:
authorAngus Gratton <angus@redyak.com.au>2024-01-10 14:11:00 +1100
committerDamien George <damien@micropython.org>2024-01-17 11:00:58 +1100
commita75ca8a1c07d7da1d0f97189cbe3238f65dda2df (patch)
treef6b67a91a272ecbd3b12e29b660487e3f3364c17 /tests/unix/extra_coverage.py
parent215a982c1469df214b2beda2db5ed8d562040738 (diff)
esp32/modsocket: Use all supplied arguments to socket.getaddrinfo().
- Completes a longstanding TODO in the code, to not ignore the optional family, type, proto and flags arguments to socket.getaddrinfo(). - Note that passing family=socket.AF_INET6 will now cause queries to fail (OSError -202). Previously this argument was ignored so IPV4 results were returned instead. - Optional 'type' argument is now always copied into the result. If not set, results have type SOCK_STREAM. - Fixes inconsistency where previously querying mDNS local suffix (.local) hostnames returned results with socket type 0 (invalid), but all other queries returned results with socket type SOCK_STREAM (regardless of 'type' argument). - Optional proto argument is now returned in the result tuple, if supplied. - Optional flags argument is now passed through to lwIP. lwIP has handling for AI_NUMERICHOST, AI_V4MAPPED, AI_PASSIVE (untested, constants for these are not currently exposed in the esp32 socket module). - Also fixes a possible memory leak in an obscure code path (lwip_getaddrinfo apparently sometimes returns a result structure with address "0.0.0.0" instead of failing, and this structure would have been leaked.) This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
Diffstat (limited to 'tests/unix/extra_coverage.py')
0 files changed, 0 insertions, 0 deletions