diff --git a/src/core/meshcop/border_agent.cpp b/src/core/meshcop/border_agent.cpp index a4c184eec72..6c67c6a5b71 100644 --- a/src/core/meshcop/border_agent.cpp +++ b/src/core/meshcop/border_agent.cpp @@ -471,34 +471,18 @@ void BorderAgent::HandleTmf(Coap::Message &aMessage, const HandleTmfDatasetGet(aMessage, aMessageInfo, kUriCommissionerGet); } -template <> -void BorderAgent::HandleTmf(Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo) -{ - IgnoreError(ForwardToLeader(aMessage, aMessageInfo, kUriCommissionerSet)); -} - template <> void BorderAgent::HandleTmf(Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo) { HandleTmfDatasetGet(aMessage, aMessageInfo, kUriActiveGet); mCounters.mMgmtActiveGets++; } -template <> void BorderAgent::HandleTmf(Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo) -{ - IgnoreError(ForwardToLeader(aMessage, aMessageInfo, kUriActiveSet)); -} - template <> void BorderAgent::HandleTmf(Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo) { HandleTmfDatasetGet(aMessage, aMessageInfo, kUriPendingGet); mCounters.mMgmtPendingGets++; } -template <> void BorderAgent::HandleTmf(Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo) -{ - IgnoreError(ForwardToLeader(aMessage, aMessageInfo, kUriPendingSet)); -} - template <> void BorderAgent::HandleTmf(Coap::Message &aMessage, const Ip6::MessageInfo &aMessageInfo) { @@ -615,12 +599,6 @@ void BorderAgent::HandleTmfDatasetGet(Coap::Message &aMessage, const Ip6::Messag Error error = kErrorNone; Coap::Message *response = nullptr; - if (mState == kStateAccepted) - { - IgnoreError(ForwardToLeader(aMessage, aMessageInfo, aUri)); - ExitNow(); - } - // When processing `MGMT_GET` request directly on Border Agent, // the Security Policy flags (O-bit) should be ignore to allow // the commissioner candidate to get the full Operational Dataset. diff --git a/src/core/meshcop/border_agent.hpp b/src/core/meshcop/border_agent.hpp index 35ee6b79b8e..8e08c22bf4f 100644 --- a/src/core/meshcop/border_agent.hpp +++ b/src/core/meshcop/border_agent.hpp @@ -349,11 +349,8 @@ DeclareTmfHandler(BorderAgent, kUriCommissionerPetition); DeclareTmfHandler(BorderAgent, kUriCommissionerKeepAlive); DeclareTmfHandler(BorderAgent, kUriRelayTx); DeclareTmfHandler(BorderAgent, kUriCommissionerGet); -DeclareTmfHandler(BorderAgent, kUriCommissionerSet); DeclareTmfHandler(BorderAgent, kUriActiveGet); -DeclareTmfHandler(BorderAgent, kUriActiveSet); DeclareTmfHandler(BorderAgent, kUriPendingGet); -DeclareTmfHandler(BorderAgent, kUriPendingSet); DeclareTmfHandler(BorderAgent, kUriProxyTx); } // namespace MeshCoP diff --git a/src/core/thread/tmf.cpp b/src/core/thread/tmf.cpp index a0bb80f3461..430f186940f 100644 --- a/src/core/thread/tmf.cpp +++ b/src/core/thread/tmf.cpp @@ -311,11 +311,8 @@ bool SecureAgent::HandleResource(const char *aUriPath, Message &aMessage, const Case(kUriCommissionerKeepAlive, MeshCoP::BorderAgent); Case(kUriRelayTx, MeshCoP::BorderAgent); Case(kUriCommissionerGet, MeshCoP::BorderAgent); - Case(kUriCommissionerSet, MeshCoP::BorderAgent); Case(kUriActiveGet, MeshCoP::BorderAgent); - Case(kUriActiveSet, MeshCoP::BorderAgent); Case(kUriPendingGet, MeshCoP::BorderAgent); - Case(kUriPendingSet, MeshCoP::BorderAgent); Case(kUriProxyTx, MeshCoP::BorderAgent); #endif