diff --git a/tests-fuzz/Makefile.am b/tests-fuzz/Makefile.am index af4ffa62435f3eecce9afc8f8f4f415695d528af..1566c5b1384e090077c6acb4c7f912739dc34277 100644 --- a/tests-fuzz/Makefile.am +++ b/tests-fuzz/Makefile.am @@ -10,7 +10,7 @@ noinst_PROGRAMS = \ packet \ knotd_stdio -knotd_stdio_SOURCES = wrap/udp-handler.c wrap/server.c +knotd_stdio_SOURCES = wrap/udp-handler.c wrap/server.c wrap/tcp-handler.c knotd_stdio_CPPFLAGS = $(AM_CPPFLAGS) $(liburcu_CFLAGS) knotd_stdio_LDADD = \ diff --git a/tests-fuzz/wrap/tcp-handler.c b/tests-fuzz/wrap/tcp-handler.c new file mode 100644 index 0000000000000000000000000000000000000000..6ebbf9e5423ca33cd66d168eb05c00ff7dcb00be --- /dev/null +++ b/tests-fuzz/wrap/tcp-handler.c @@ -0,0 +1,25 @@ +/* Copyright (C) 2015 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz> + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#define tcp_master _orig_tcp_master +#include "knot/server/tcp-handler.c" +#undef tcp_master + +int tcp_master(dthread_t *thread) +{ + log_info("AFL, tcp_master out of order"); + return 0; +}