From d0854a6c175b805c48708d88e85a54e095fb7671 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Mon, 6 May 2013 21:06:31 +0200 Subject: [PATCH] AddressIsUs did fail for IPv6, as Sten Spans had predicted, but failed differently ;-) --- pdns/nameserver.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/nameserver.cc b/pdns/nameserver.cc index 5584a62ac3..a11034c3c4 100644 --- a/pdns/nameserver.cc +++ b/pdns/nameserver.cc @@ -83,7 +83,7 @@ extern StatBag S; #define GEN_IP_PKTINFO IP_RECVDSTADDR #endif -vector g_localaddresses; +vector g_localaddresses; // not static, our unit tests need to poke this void UDPNameserver::bindIPv4() { @@ -159,7 +159,7 @@ bool AddressIsUs(const ComboAddress& remote) if(remote == us) return true; if(IsAnyAddress(us)) { - int s = socket(AF_INET, SOCK_DGRAM, 0); + int s = socket(remote.sin4.sin_family, SOCK_DGRAM, 0); if(s < 0) continue; -- 2.47.3