An IPv6 address matching should be fixed. Specifying an IPv6

address by the -a option was broken since r309933.

Reported by:	"O. Hartmann" <ohartmann [...] walstatt.org>
MFC after:	1 week
This commit is contained in:
Hajimu UMEMOTO 2019-02-24 03:41:05 +00:00
parent 62e802cf3a
commit 22cd7e923f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=344491

View File

@ -3202,8 +3202,8 @@ validate(struct sockaddr *sa, const char *hname)
dprintf("rejected in rule %d due to scope mismatch.\n", i);
continue;
}
if (IN6_ARE_MASKED_ADDR_EQUAL(&sin6->sin6_addr,
&a6p->sin6_addr, &m6p->sin6_addr) != 0) {
if (!IN6_ARE_MASKED_ADDR_EQUAL(&sin6->sin6_addr,
&a6p->sin6_addr, &m6p->sin6_addr)) {
dprintf("rejected in rule %d due to IP mismatch.\n", i);
continue;
}