mirror of
https://github.com/espressif/openthread.git
synced 2026-09-11 03:30:09 +00:00
[joiner] check for non-zero joiner UDP port before electing a joiner router (#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.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user