From 428b3759ef84c65d3e6335050d0854e60278afa5 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Fri, 3 Feb 2017 20:36:53 -0800 Subject: [PATCH] Enable IPv6 datagram filter by default from `NcpBase` constructor (#1256) * Enable IPv6 datagram filter by default from `NcpBase` constructor * Enable RLOC pass through when in Tunnel mode --- examples/drivers/windows/otLwf/tunnel.c | 14 ++++++++++++++ src/ncp/ncp_base.cpp | 1 + 2 files changed, 15 insertions(+) diff --git a/examples/drivers/windows/otLwf/tunnel.c b/examples/drivers/windows/otLwf/tunnel.c index edde26215..ff31f4b3f 100644 --- a/examples/drivers/windows/otLwf/tunnel.c +++ b/examples/drivers/windows/otLwf/tunnel.c @@ -102,6 +102,20 @@ otLwfTunInitialize( KeSetEvent(&pFilter->TunWorkerThreadStopEvent, IO_NO_INCREMENT, FALSE); } + // Make sure to enable RLOC passthrough + Status = + otLwfCmdSetProp( + pFilter, + SPINEL_PROP_THREAD_RLOC16_DEBUG_PASSTHRU, + SPINEL_DATATYPE_BOOL_S, + TRUE + ); + if (!NT_SUCCESS(Status)) + { + LogError(DRIVER_DEFAULT, "Enabling RLOC pass through failed, %!STATUS!", Status); + goto error; + } + // TODO - Query other values and capabilities error: diff --git a/src/ncp/ncp_base.cpp b/src/ncp/ncp_base.cpp index 06903eab7..68bcf285d 100644 --- a/src/ncp/ncp_base.cpp +++ b/src/ncp/ncp_base.cpp @@ -514,6 +514,7 @@ NcpBase::NcpBase(otInstance *aInstance): otSetReceiveIp6DatagramCallback(mInstance, &NcpBase::HandleDatagramFromStack, this); otSetLinkPcapCallback(mInstance, &NcpBase::HandleRawFrame, static_cast(this)); otSetIcmpEchoEnabled(mInstance, false); + otSetReceiveIp6DatagramFilterEnabled(mInstance, true); mUpdateChangedPropsTask.Post();