11 #include <sys/types.h>
16 #include "interface.h"
19 int cfg_no_subnet
= 0;
21 static void fuzz_dns_handle_packet(uint8_t *input
, size_t size
)
24 struct interface iface
;
25 struct cache_service
*s
, *t
;
27 memset(&from
, 0, sizeof(from
));
28 memset(&iface
, 0, sizeof(iface
));
31 dns_handle_packet(&iface
, &from
, 1922, input
, size
);
33 avl_for_each_element_safe(&services
, s
, avl
, t
)
34 cache_service_free(s
);
37 int LLVMFuzzerTestOneInput(const uint8_t *input
, size_t size
)
39 uint8_t *buf
= calloc(1, size
);
43 memcpy(buf
, input
, size
);
44 fuzz_dns_handle_packet(buf
, size
);