From 9a21c8c8e850f6f4111294ab1cc69f27f82ab3af Mon Sep 17 00:00:00 2001 From: claudio Date: Tue, 18 Apr 2023 06:41:00 +0000 Subject: [PATCH] I reversed flowspec_cmp() so adjust the code here as well. Reminded by anton@ --- regress/usr.sbin/bgpd/unittests/rde_flowspec_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/regress/usr.sbin/bgpd/unittests/rde_flowspec_test.c b/regress/usr.sbin/bgpd/unittests/rde_flowspec_test.c index e25826858c6..52a1a51f9ed 100644 --- a/regress/usr.sbin/bgpd/unittests/rde_flowspec_test.c +++ b/regress/usr.sbin/bgpd/unittests/rde_flowspec_test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_flowspec_test.c,v 1.1 2023/04/17 08:02:55 claudio Exp $ */ +/* $OpenBSD: rde_flowspec_test.c,v 1.2 2023/04/18 06:41:00 claudio Exp $ */ /* * Copyright (c) 2023 Claudio Jeker @@ -119,8 +119,8 @@ test_flowspec_valid(void) static int do_cmp(const uint8_t *a, int alen, const uint8_t *b, int blen, int is_v6) { - if (flowspec_cmp(a, alen, b, blen, is_v6) != 1 || - flowspec_cmp(b, blen, a, alen, is_v6) != -1) + if (flowspec_cmp(a, alen, b, blen, is_v6) != -1 || + flowspec_cmp(b, blen, a, alen, is_v6) != 1) return -1; return 0; } -- 2.20.1