-/* $OpenBSD: readconf.c,v 1.399 2025/05/06 05:40:56 djm Exp $ */
+/* $OpenBSD: readconf.c,v 1.400 2025/06/24 09:22:03 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
if (strcasecmp(attrib, "canonical") == 0 ||
strcasecmp(attrib, "final") == 0) {
/*
- * If the config requests "Match final" then remember
- * this so we can perform a second pass later.
+ * If the config requests "Match final" without
+ * negation then remember this so we can perform a
+ * second pass later.
*/
if (strcasecmp(attrib, "final") == 0 &&
want_final_pass != NULL)
- *want_final_pass = 1;
+ *want_final_pass |= !negate;
r = !!final_pass; /* force bitmask member to boolean */
if (r == (negate ? 1 : 0))
this_result = result = 0;