summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2018-05-25 14:31:59 +0200
committerChristian Franke <chris@opensourcerouting.org>2018-09-05 11:38:13 +0200
commit9d33cf3886c6451291d019577ae6e6f1c9dbbf2a (patch)
tree62261f2167ec063173a7dbde6fd4ffa9b614f66e /tests
parentisisd: add support for Prefix-SID subtlv (diff)
downloadfrr-9d33cf3886c6451291d019577ae6e6f1c9dbbf2a.tar.xz
frr-9d33cf3886c6451291d019577ae6e6f1c9dbbf2a.zip
tests/isisd: remove auth when fuzzing
Our "deserialize, reserialize, check-equality" test fails when the fuzzer produces PDUs with incorrect cryptographic checksums. While the most realistic solution would be to validate the cryptographic checksums in the test program, that seems very silly, given that we don't want to fuzz our cryptographic auth. Given that, removing auth during fuzzing seems the next best solution. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/isisd/test_fuzz_isis_tlv.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/isisd/test_fuzz_isis_tlv.c b/tests/isisd/test_fuzz_isis_tlv.c
index 67a159350..3a56f83f0 100644
--- a/tests/isisd/test_fuzz_isis_tlv.c
+++ b/tests/isisd/test_fuzz_isis_tlv.c
@@ -114,7 +114,11 @@ static int test(FILE *input, FILE *output)
const char *s_tlvs = isis_format_tlvs(tlvs);
fprintf(output, "Unpacked TLVs:\n%s", s_tlvs);
+ struct isis_item *orig_auth = tlvs->isis_auth.head;
+ tlvs->isis_auth.head = NULL;
+ s_tlvs = isis_format_tlvs(tlvs);
struct isis_tlvs *tlv_copy = isis_copy_tlvs(tlvs);
+ tlvs->isis_auth.head = orig_auth;
isis_free_tlvs(tlvs);
struct stream *s2 = stream_new(TEST_STREAM_SIZE);