]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
ChangeLog:
authorFrank Kardel <kardel@ntp.org>
Sun, 30 Sep 2007 15:57:52 +0000 (15:57 +0000)
committerFrank Kardel <kardel@ntp.org>
Sun, 30 Sep 2007 15:57:52 +0000 (15:57 +0000)
  [Bug 771] compare scopeid if available for IPv6 addresses
ntp.h:
  Bug 771: compare scopeid if available for IPv6 addresses

bk: 46ffc780M1aYCVs7E1lwNJWJ6l9Spg

ChangeLog
include/ntp.h

index ed00aed555deb4a8a6ba9647b665651435155895..cc40f91e8354c8f765ab0b2abe3db4daa426e489 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+* [Bug 771] compare scopeid if available for IPv6 addresses
 * [Bug 899] Only show -i/--jaildir -u/--user options if we HAVE_DROPROOT.
 * [Bug 916] 'cryptosw' is undefined if built without OpenSSL.
 * [Bug 891] 'restrict' config file keyword does not work (partial fix).
index c2a2937363c807c306316610752c398a479b8830..ce0661f2657c34642ce394183b4e5e15652360ee 100644 (file)
@@ -515,6 +515,12 @@ struct peer {
  /*
  * Macro for sockaddr_storage structures operations
  */
+#ifdef ISC_PLATFORM_HAVESCOPEID
+#define SOCKSCOPE(sock1, sock2) (((struct sockaddr_in6 *)sock1)->sin6_scope_id == ((struct sockaddr_in6 *)sock2)->sin6_scope_id)
+#else
+#define SOCKSCOPE(sock1, sock2) 1
+#endif
+
 #define SOCKCMP(sock1, sock2) \
        (((struct sockaddr_storage *)sock1)->ss_family \
            == ((struct sockaddr_storage *)sock2)->ss_family ? \
@@ -524,7 +530,7 @@ struct peer {
            sizeof(struct in_addr)) == 0 : \
        memcmp(&((struct sockaddr_in6 *)sock1)->sin6_addr, \
            &((struct sockaddr_in6 *)sock2)->sin6_addr, \
-           sizeof(struct in6_addr)) == 0 : \
+              sizeof(struct in6_addr)) == 0 && SOCKSCOPE(sock1, sock2) : \
        0)
 
 #define SOCKNUL(sock1) \