Skip to content

Commit

Permalink
[joiner] check for non-zero joiner UDP port before electing a joiner …
Browse files Browse the repository at this point in the history
…router (openthread#9445)

An invalid Discovery Response that carries no Joiner UDP Port TLV will
be accepted by the joiner, but we shouldn't qualify it as a valid
joiner router since we can only open a connection with a non-zero
port.
  • Loading branch information
suveshpratapa authored Sep 28, 2023
1 parent 50487a6 commit f19548b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/meshcop/joiner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ void Joiner::HandleDiscoverResult(Mle::DiscoverScanner::ScanResult *aResult)
{
VerifyOrExit(mState == kStateDiscover);

if (aResult != nullptr)
if (aResult != nullptr && aResult->mJoinerUdpPort > 0)
{
SaveDiscoveredJoinerRouter(*aResult);
}
Expand Down

0 comments on commit f19548b

Please sign in to comment.