Revert "Allow binding to IPv6 (if present)"

This reverts commit f55004a574.
This commit is contained in:
Tristan B. Velloza Kildaire 2024-11-04 13:25:46 +02:00
parent 3599066356
commit 61712d322a
1 changed files with 0 additions and 5 deletions

View File

@ -412,11 +412,6 @@ class TCPServerInterface(Interface):
def get_address_for_if(name): def get_address_for_if(name):
import RNS.vendor.ifaddr.niwrapper as netinfo import RNS.vendor.ifaddr.niwrapper as netinfo
ifaddr = netinfo.ifaddresses(name) ifaddr = netinfo.ifaddresses(name)
# IPv6 preference (if present)
if(netinfo.AF_INET6 in ifaddr):
return ifaddr[netinfo.AF_INET6][0]["addr"]
return ifaddr[netinfo.AF_INET][0]["addr"] return ifaddr[netinfo.AF_INET][0]["addr"]
@staticmethod @staticmethod