Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libwrap PR/54992: fix hosts_access(5) to works for IPv6 ...



details:   https://anonhg.NetBSD.org/src/rev/6e75f350576a
branches:  trunk
changeset: 1008660:6e75f350576a
user:      ryo <ryo%NetBSD.org@localhost>
date:      Mon Mar 30 08:34:38 2020 +0000

description:
PR/54992: fix hosts_access(5) to works for IPv6 linklocal address without scope-id

diffstat:

 lib/libwrap/hosts_access.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 2e4aee732780 -r 6e75f350576a lib/libwrap/hosts_access.c
--- a/lib/libwrap/hosts_access.c        Mon Mar 30 08:24:36 2020 +0000
+++ b/lib/libwrap/hosts_access.c        Mon Mar 30 08:34:38 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: hosts_access.c,v 1.21 2016/02/17 19:52:20 christos Exp $       */
+/*     $NetBSD: hosts_access.c,v 1.22 2020/03/30 08:34:38 ryo Exp $    */
 
  /*
   * This module implements a simple access control language that is based on
@@ -24,7 +24,7 @@
 #if 0
 static char sccsid[] = "@(#) hosts_access.c 1.21 97/02/12 02:13:22";
 #else
-__RCSID("$NetBSD: hosts_access.c,v 1.21 2016/02/17 19:52:20 christos Exp $");
+__RCSID("$NetBSD: hosts_access.c,v 1.22 2020/03/30 08:34:38 ryo Exp $");
 #endif
 #endif
 
@@ -561,7 +561,7 @@
     for (i = 0; i < alen; i++)
        ap[i] &= mp[i];
 
-    if (addr.sa.sa_family == AF_INET6 && addr.sin6.sin6_scope_id &&
+    if (addr.sa.sa_family == AF_INET6 && net.sin6.sin6_scope_id &&
         addr.sin6.sin6_scope_id != net.sin6.sin6_scope_id)
        return NO;
     return (memcmp(ap, np, alen) == 0);



Home | Main Index | Thread Index | Old Index