#727 net.server uses socket.dns.getaddrinfo which is missing from luasocket 2
Reporter
Zash
Owner
Nobody
Created
Updated
Stars
★ (1)
Tags
Component-Docs
Status-Fixed
Milestone-0.10
Type-Defect
Priority-Medium
Zash
on
What steps will reproduce the problem?
1. Run Prosody 0.10 or trunk with LuaSocket 2.0.2
2. server.addclient(...)
What is the expected output?
No problems.
What do you see instead?
Traceback due to missing getaddrinfo()
This was introduced in https://hg.prosody.im/0.10/rev/ffb2b5e31456
Possible solutions:
- Declare that 0.10 depends on LuaSocket 3
- Revert the commit.
Zash
on
Changes
tags Milestone-0.10
Zash
on
This is further complicated by the IP version agnostic stuff in recent LuaSocket.
Before:
socket.tcp() -> ipv4
socket.tcp6() -> ipv6 (if available)
After:
socket.tcp() -> ip agnostic, becomes v4 or v6 after given an address, invalid FD until then
socket.tcp4() and .tcp6() -> v4 or v6 as before
Zash
on
Changes
tags Status-Accepted
Zash
on
The real solution here is having async DNS support in case you pass a DNS name to server.addclient(), and proper distinguishing of v6 and v4 addresses otherwise.
Zash
on
Let's just say LuaSocket 3.x is needed, everyone should have it already.
What steps will reproduce the problem? 1. Run Prosody 0.10 or trunk with LuaSocket 2.0.2 2. server.addclient(...) What is the expected output? No problems. What do you see instead? Traceback due to missing getaddrinfo() This was introduced in https://hg.prosody.im/0.10/rev/ffb2b5e31456 Possible solutions: - Declare that 0.10 depends on LuaSocket 3 - Revert the commit.
This is further complicated by the IP version agnostic stuff in recent LuaSocket. Before: socket.tcp() -> ipv4 socket.tcp6() -> ipv6 (if available) After: socket.tcp() -> ip agnostic, becomes v4 or v6 after given an address, invalid FD until then socket.tcp4() and .tcp6() -> v4 or v6 as before
The real solution here is having async DNS support in case you pass a DNS name to server.addclient(), and proper distinguishing of v6 and v4 addresses otherwise.
Let's just say LuaSocket 3.x is needed, everyone should have it already.
Changes