From: Ondrej Zajicek (work) Date: Tue, 3 Mar 2020 18:04:05 +0000 (+0100) Subject: Flowspec: Fix tests X-Git-Tag: v2.0.8~93 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e6746da6de45bcacc42010cea828129eae38ba67;p=thirdparty%2Fbird.git Flowspec: Fix tests Missing dst no longer generates error. --- diff --git a/lib/flowspec_test.c b/lib/flowspec_test.c index bff33e7e6..b6b4d7b8f 100644 --- a/lib/flowspec_test.c +++ b/lib/flowspec_test.c @@ -229,11 +229,9 @@ t_validation4(void) FLOW_TYPE_TCP_FLAGS, 0x80, 0x55, }; - /* Isn't included destination prefix */ + /* Empty NLRI */ res = flow4_validate(nlri1, 0); - bt_assert(res == FLOW_ST_DEST_PREFIX_REQUIRED); - res = flow4_validate(&nlri1[5], sizeof(nlri1)-5); - bt_assert(res == FLOW_ST_DEST_PREFIX_REQUIRED); + bt_assert(res == FLOW_ST_VALID); /* Valid / Not Complete testing */ uint valid_sizes[] = {5, 11, 14, 22, 25, 0};