Skip to content

Commit

Permalink
[epskc] enable by default for Thread 1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
yuzhyang committed Aug 12, 2024
1 parent 92ac6cb commit 368aa32
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/border_agent/border_agent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@
#error "Border Agent feature requires at least one `OTBR_MDNS` implementation"
#endif

# define OT_THREAD_VERSION_1_4 5

#ifndef OTBR_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ON_INIT
#define OTBR_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ON_INIT (otThreadGetVersion() >= OT_THREAD_VERSION_1_4)
#endif

namespace otbr {

static const char kBorderAgentServiceType[] = "_meshcop._udp"; ///< Border agent service type of mDNS
Expand Down Expand Up @@ -163,6 +169,8 @@ BorderAgent::BorderAgent(otbr::Ncp::RcpHost &aHost, Mdns::Publisher &aPublisher)
, mBaseServiceInstanceName(OTBR_MESHCOP_SERVICE_INSTANCE_NAME)
{
mHost.AddThreadStateChangedCallback([this](otChangedFlags aFlags) { HandleThreadStateChanged(aFlags); });
mIsEphemeralKeyEnabled = OTBR_CONFIG_BORDER_AGENT_EPHEMERAL_KEY_ON_INIT;
otbrLogInfo("Ephemeral Key is: %s during initialization", (mIsEphemeralKeyEnabled ? "enabled" : "disabled"));
}

otbrError BorderAgent::SetMeshCopServiceValues(const std::string &aServiceInstanceName,
Expand Down

0 comments on commit 368aa32

Please sign in to comment.