diff options
author | djm@openbsd.org <djm@openbsd.org> | 2016-09-21 16:55:42 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2016-09-22 03:14:59 +1000 |
commit | a5ad3a9db5a48f350f257a67b62fafd719ecb7e0 (patch) | |
tree | 842a9d9504bbdb2b341019b52827656f7e34e3fc /addrmatch.c | |
parent | 119b7a2ca0ef2bf3f81897ae10301b8ca8cba844 (diff) |
upstream commit
Revert two recent changes to negated address matching. The
new behaviour offers unintuitive surprises. We'll find a better way to deal
with single negated matches.
match.c 1.31:
> fix matching for pattern lists that contain a single negated match,
> e.g. "Host !example"
>
> report and patch from Robin Becker. bz#1918 ok dtucker@
addrmatch.c 1.11:
> fix negated address matching where the address list consists of a
> single negated match, e.g. "Match addr !192.20.0.1"
>
> Report and patch from Jakub Jelen. bz#2397 ok dtucker@
Upstream-ID: ec96c770f0f5b9a54e5e72fda25387545e9c80c6
Diffstat (limited to 'addrmatch.c')
-rw-r--r-- | addrmatch.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/addrmatch.c b/addrmatch.c index cba1854ec..8658e105a 100644 --- a/addrmatch.c +++ b/addrmatch.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: addrmatch.c,v 1.12 2016/08/23 08:17:42 djm Exp $ */ | 1 | /* $OpenBSD: addrmatch.c,v 1.13 2016/09/21 16:55:42 djm Exp $ */ |
2 | 2 | ||
3 | /* | 3 | /* |
4 | * Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org> | 4 | * Copyright (c) 2004-2008 Damien Miller <djm@mindrot.org> |
@@ -411,8 +411,7 @@ addr_match_list(const char *addr, const char *_list) | |||
411 | break; | 411 | break; |
412 | } | 412 | } |
413 | ret = 1; | 413 | ret = 1; |
414 | } else if (neg) | 414 | } |
415 | ret = 1; | ||
416 | continue; | 415 | continue; |
417 | } else { | 416 | } else { |
418 | /* If CIDR parse failed, try wildcard string match */ | 417 | /* If CIDR parse failed, try wildcard string match */ |