Skip to content

Commit

Permalink
CI/mdns: Fix fuzzer build
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cermak committed Mar 8, 2022
1 parent d1b809e commit 98e9426
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions components/mdns/test_afl_fuzz_host/sdkconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@
#define CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED 1
#define CONFIG_MBEDTLS_ECP_NIST_OPTIM 1
#define CONFIG_MDNS_MAX_SERVICES 25
#define CONFIG_MDNS_MAX_INTERFACES 3
#define CONFIG_MDNS_TASK_PRIORITY 1
#define CONFIG_MDNS_TASK_STACK_SIZE 4096
#define CONFIG_MDNS_TASK_AFFINITY_CPU0 1
Expand Down
6 changes: 4 additions & 2 deletions components/mdns/test_afl_fuzz_host/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ extern mdns_server_t * _mdns_server;
// mdns function wrappers for mdns setup in test mode
static int mdns_test_hostname_set(const char * mdns_hostname)
{
_mdns_server->interfaces[MDNS_IF_STA].pcbs[MDNS_IP_PROTOCOL_V4].state = PCB_RUNNING; // mark the PCB running to exercise mdns in fully operational mode
_mdns_server->interfaces[MDNS_IF_STA].pcbs[MDNS_IP_PROTOCOL_V6].state = PCB_RUNNING;
for (int i=0; i<MDNS_MAX_INTERFACES; i++) {
_mdns_server->interfaces[i].pcbs[MDNS_IP_PROTOCOL_V4].state = PCB_RUNNING; // mark the PCB running to exercise mdns in fully operational mode
_mdns_server->interfaces[i].pcbs[MDNS_IP_PROTOCOL_V6].state = PCB_RUNNING;
}
int ret = mdns_hostname_set(mdns_hostname);
mdns_action_t * a = NULL;
GetLastItem(&a);
Expand Down

0 comments on commit 98e9426

Please sign in to comment.