mirror of
https://github.com/espressif/openthread.git
synced 2026-08-24 19:29:52 +00:00
[fuzz] enable SRP server in fuzz targets (#8145)
This commit is contained in:
@@ -34,6 +34,7 @@
|
||||
#include <openthread/ip6.h>
|
||||
#include <openthread/link.h>
|
||||
#include <openthread/message.h>
|
||||
#include <openthread/srp_server.h>
|
||||
#include <openthread/tasklet.h>
|
||||
#include <openthread/thread.h>
|
||||
#include <openthread/thread_ftd.h>
|
||||
@@ -58,6 +59,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
IgnoreError(otLinkSetPanId(instance, panId));
|
||||
IgnoreError(otIp6SetEnabled(instance, true));
|
||||
IgnoreError(otThreadSetEnabled(instance, true));
|
||||
otSrpServerSetEnabled(instance, true);
|
||||
IgnoreError(otThreadBecomeLeader(instance));
|
||||
|
||||
settings.mLinkSecurityEnabled = (data[0] & 0x1) != 0;
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
#include <openthread/ip6.h>
|
||||
#include <openthread/link.h>
|
||||
#include <openthread/ncp.h>
|
||||
#include <openthread/srp_server.h>
|
||||
#include <openthread/tasklet.h>
|
||||
#include <openthread/thread.h>
|
||||
#include <openthread/thread_ftd.h>
|
||||
@@ -66,6 +67,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
|
||||
IgnoreError(otLinkSetPanId(instance, panId));
|
||||
IgnoreError(otIp6SetEnabled(instance, true));
|
||||
IgnoreError(otThreadSetEnabled(instance, true));
|
||||
otSrpServerSetEnabled(instance, true);
|
||||
IgnoreError(otThreadBecomeLeader(instance));
|
||||
|
||||
buf = static_cast<uint8_t *>(malloc(size));
|
||||
|
||||
Reference in New Issue
Block a user