summaryrefslogtreecommitdiff
path: root/match.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2016-09-21 16:55:42 +0000
committerDamien Miller <djm@mindrot.org>2016-09-22 03:14:59 +1000
commita5ad3a9db5a48f350f257a67b62fafd719ecb7e0 (patch)
tree842a9d9504bbdb2b341019b52827656f7e34e3fc /match.c
parent119b7a2ca0ef2bf3f81897ae10301b8ca8cba844 (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 'match.c')
-rw-r--r--match.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/match.c b/match.c
index fd784ff14..b29a30e91 100644
--- a/match.c
+++ b/match.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: match.c,v 1.31 2016/08/23 03:22:49 djm Exp $ */ 1/* $OpenBSD: match.c,v 1.32 2016/09/21 16:55:42 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -158,8 +158,7 @@ match_pattern_list(const char *string, const char *pattern, int dolower)
158 return -1; /* Negative */ 158 return -1; /* Negative */
159 else 159 else
160 got_positive = 1; /* Positive */ 160 got_positive = 1; /* Positive */
161 } else if (negated) 161 }
162 got_positive = 1;
163 } 162 }
164 163
165 /* 164 /*