mirror of
https://github.com/espressif/openthread.git
synced 2026-09-13 20:50:05 +00:00
[icmp6] allow config of echo handling for unicast/multicast separately (#2609)
Previously, ICMPv6 Echo Request handling was either enabled or disabled. This commit allows enabling/disabling the handler for ICMPv6 Echo Requests sent to unicast and multicast destinations separately. This commit also adds an associated spinel property and NCP implementation.
This commit is contained in:
@@ -786,7 +786,7 @@ otLwfEventWorkerThread(
|
||||
NT_ASSERT(otCtxToFilter(pFilter->otCtx) == pFilter);
|
||||
|
||||
// Disable Icmp (ping) handling
|
||||
otIcmp6SetEchoEnabled(pFilter->otCtx, FALSE);
|
||||
otIcmp6SetEchoMode(pFilter->otCtx, OT_ICMP6_ECHO_HANDLER_DISABLED);
|
||||
|
||||
// Register callbacks with OpenThread
|
||||
otSetStateChangedCallback(pFilter->otCtx, otLwfStateChangedCallback, pFilter);
|
||||
|
||||
@@ -82,7 +82,7 @@ otPlatReset(
|
||||
NT_ASSERT(otCtxToFilter(pFilter->otCtx) == pFilter);
|
||||
|
||||
// Disable Icmp (ping) handling
|
||||
otIcmp6SetEchoEnabled(pFilter->otCtx, FALSE);
|
||||
otIcmp6SetEchoMode(pFilter->otCtx, OT_ICMP6_ECHO_HANDLER_DISABLED);
|
||||
|
||||
// Register callbacks with OpenThread
|
||||
otSetStateChangedCallback(pFilter->otCtx, otLwfStateChangedCallback, pFilter);
|
||||
|
||||
Reference in New Issue
Block a user