paulc / dnslib

A Python library to encode/decode DNS wire-format packets
https://github.com/paulc/dnslib
BSD 2-Clause "Simplified" License
295 stars 84 forks source link

Use dual-stack socket servers #21

Closed mikma closed 3 years ago

mikma commented 3 years ago

It would be useful to support dual-stack server sockets by default.

Use dual-stack socket servers with the default server address and when an IPv6 server address is specified. This way the caller doesn't need to supply a server socket handler in order to use IPv6.

paulc commented 3 years ago

I've implemented this in 0.9.15 (I was making some changes to DNSServer anyway so implemented there - note that I don't enable socket.AF_INET6 if the address is '' as this doesn't work on servers without an IPV6 address)