]> git.ipfire.org Git - people/ms/dnsmasq.git/commitdiff
Cope with multiple interfaces with the same LL address.
authorSimon Kelley <simon@thekelleys.org.uk>
Sun, 18 Jan 2015 22:11:10 +0000 (22:11 +0000)
committerSimon Kelley <simon@thekelleys.org.uk>
Sun, 18 Jan 2015 22:11:10 +0000 (22:11 +0000)
CHANGELOG
src/auth.c
src/util.c

index 23fc6d0530cf325609df2c46ad00fdd0506b3826..bbd7e66196896869c4c47222e1d2279e1a6acedc 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -49,6 +49,10 @@ version 2.73
            sometimes reasons to do it. (Step forward, GFW).
            To avoid misuse, there's a hard limit on the TTL 
            floor of one hour. Thansk to RinSatsuki for the patch.
+
+           Cope with multiple interfaces with the same link-local 
+           address. (IPv6 addresses are scoped, so this is allowed.)
+           Thanks to Cory Benfield for help with this.
        
        
 version 2.72
index a327f16d8c0bd9d55a3071b1c534efc15e74c7e0..59e05d3da38e95722374b649f33a2d4b3de65a63 100644 (file)
@@ -413,7 +413,10 @@ size_t answer_auth(struct dns_header *header, char *limit, size_t qlen, time_t n
                peer_addr->in.sin_port = 0;
 #ifdef HAVE_IPV6
              else
-               peer_addr->in6.sin6_port = 0; 
+               {
+                 peer_addr->in6.sin6_port = 0; 
+                 peer_addr->in6.sin6_scope_id = 0;
+               }
 #endif
              
              for (peers = daemon->auth_peers; peers; peers = peers->next)
index a729f339e219d3e24fd28ab2ac0e5410da2d0f8e..d532444da2073f5585d87b5683164732aaa5a805 100644 (file)
@@ -274,6 +274,7 @@ int sockaddr_isequal(union mysockaddr *s1, union mysockaddr *s2)
 #ifdef HAVE_IPV6      
       if (s1->sa.sa_family == AF_INET6 &&
          s1->in6.sin6_port == s2->in6.sin6_port &&
+         s1->in6.sin6_scope_id == s2->in6.sin6_scope_id &&
          IN6_ARE_ADDR_EQUAL(&s1->in6.sin6_addr, &s2->in6.sin6_addr))
        return 1;
 #endif