1 From 393415597c8b5b09558b789ab9ac238dbe3db65d Mon Sep 17 00:00:00 2001
2 From: Simon Kelley <simon@thekelleys.org.uk>
3 Date: Sun, 18 Jan 2015 22:11:10 +0000
4 Subject: [PATCH 032/113] Cope with multiple interfaces with the same LL
11 3 files changed, 9 insertions(+), 1 deletion(-)
13 diff --git a/CHANGELOG b/CHANGELOG
14 index 23fc6d0530cf..bbd7e6619689 100644
17 @@ -49,6 +49,10 @@ version 2.73
18 sometimes reasons to do it. (Step forward, GFW).
19 To avoid misuse, there's a hard limit on the TTL
20 floor of one hour. Thansk to RinSatsuki for the patch.
22 + Cope with multiple interfaces with the same link-local
23 + address. (IPv6 addresses are scoped, so this is allowed.)
24 + Thanks to Cory Benfield for help with this.
28 diff --git a/src/auth.c b/src/auth.c
29 index a327f16d8c0b..59e05d3da38e 100644
32 @@ -413,7 +413,10 @@ size_t answer_auth(struct dns_header *header, char *limit, size_t qlen, time_t n
33 peer_addr->in.sin_port = 0;
36 - peer_addr->in6.sin6_port = 0;
38 + peer_addr->in6.sin6_port = 0;
39 + peer_addr->in6.sin6_scope_id = 0;
43 for (peers = daemon->auth_peers; peers; peers = peers->next)
44 diff --git a/src/util.c b/src/util.c
45 index a729f339e219..d532444da207 100644
48 @@ -274,6 +274,7 @@ int sockaddr_isequal(union mysockaddr *s1, union mysockaddr *s2)
50 if (s1->sa.sa_family == AF_INET6 &&
51 s1->in6.sin6_port == s2->in6.sin6_port &&
52 + s1->in6.sin6_scope_id == s2->in6.sin6_scope_id &&
53 IN6_ARE_ADDR_EQUAL(&s1->in6.sin6_addr, &s2->in6.sin6_addr))