Module Name: src
Committed By: ryo
Date: Mon Mar 30 08:34:38 UTC 2020
Modified Files:
src/lib/libwrap: hosts_access.c
Log Message:
PR/54992: fix hosts_access(5) to works for IPv6 linklocal address without
scope-id
To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/lib/libwrap/hosts_access.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libwrap/hosts_access.c
diff -u src/lib/libwrap/hosts_access.c:1.21 src/lib/libwrap/hosts_access.c:1.22
--- src/lib/libwrap/hosts_access.c:1.21 Wed Feb 17 19:52:20 2016
+++ src/lib/libwrap/hosts_access.c Mon Mar 30 08:34:38 2020
@@ -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 @@ masked_match6(char *net_tok, char *mask_
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);