#727 net.server uses socket.dns.getaddrinfo which is missing from luasocket 2

Reporter Zash
Owner Nobody
Stars ★ (1)  
  • Status-Fixed
  • Component-Docs
  • Milestone-0.10
  • Type-Defect
  • Priority-Medium
  1. 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.

  2. Zash on

    • tags Milestone-0.10
  3. 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

  4. Zash on

    • tags Status-Accepted
  5. 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.

  6. Zash on

    Let's just say LuaSocket 3.x is needed, everyone should have it already.

    • tags Component-Docs Status-Fixed

New comment

Not published. Used for spam prevention and optional update notifications.