]> git.ipfire.org Git - thirdparty/lldpd.git/commitdiff
tests: add instructions on how to use afl for fuzzing
authorVincent Bernat <vincent@bernat.im>
Sat, 3 Oct 2015 23:28:30 +0000 (01:28 +0200)
committerVincent Bernat <vincent@bernat.im>
Sat, 3 Oct 2015 23:28:30 +0000 (01:28 +0200)
README.md

index fae2094220841f03239d967e35bb8f7b0d453347..1051aac2b7e5c4d40afa042e62a335b95b061a5b 100644 (file)
--- a/README.md
+++ b/README.md
@@ -213,6 +213,18 @@ You can append any further arguments. If lldpd is unable to find
 `lldpcli` it will start in an unconfigured mode and won't send or
 accept LLDP frames.
 
+You can use [afl](http://lcamtuf.coredump.cx/afl/) to test some
+aspects of lldpd. To test frame decoding, you can do something like
+that:
+
+    export AFL_USE_ASAN=1 # only on 32bit arch
+    ./configure CC=afl-gcc
+    make clean check
+    cd tests
+    mkdir inputs
+    mv *.pcap inputs
+    afl-fuzz -i inputs -o outputs ./decode @@
+
 Embedding
 ---------