diff options
| author | ryo <ryo@NetBSD.org> | 2020-03-30 08:34:38 +0000 |
|---|---|---|
| committer | ryo <ryo@NetBSD.org> | 2020-03-30 08:34:38 +0000 |
| commit | 0f173e83d2d4cf1088ff3f85ffad659fd0d9b0ce (patch) | |
| tree | a48788b226a595ab79dcd188d9f74a46f6d4ee41 /lib/libwrap | |
| parent | 793d2e1c5b4849b1a71dbba037c481dba9ea16b8 (diff) | |
PR/54992: fix hosts_access(5) to works for IPv6 linklocal address without scope-id
Diffstat (limited to 'lib/libwrap')
| -rw-r--r-- | lib/libwrap/hosts_access.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libwrap/hosts_access.c b/lib/libwrap/hosts_access.c index 1e0b989188f..80f551b4f2e 100644 --- a/lib/libwrap/hosts_access.c +++ b/lib/libwrap/hosts_access.c @@ -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_tok, char *string) 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); |
