]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Flowspec: Fix tests
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 3 Mar 2020 18:04:05 +0000 (19:04 +0100)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Tue, 3 Mar 2020 18:04:33 +0000 (19:04 +0100)
Missing dst no longer generates error.

lib/flowspec_test.c

index bff33e7e6e4975794290fb68e3ec271cb7f2d91b..b6b4d7b8f18751825daf47ecbe716fd3c4a07eb8 100644 (file)
@@ -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};