[fuzz] enable SRP server in fuzz targets (#8145)

This commit is contained in:
Jonathan Hui
2022-09-12 21:23:31 -07:00
parent 945edf1eb6
commit e9877198c4
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -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;
+2
View File
@@ -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));