commit | 30f8393b310c2d303860d23423b718143c1bcf02 | [log] [tgz] |
---|---|---|
author | Jason Graffius <jgraff@google.com> | Tue Jul 21 15:42:04 2020 -0700 |
committer | Jason Graffius <jgraff@google.com> | Tue Jul 21 15:45:16 2020 -0700 |
tree | c86d1d83017e7f6008767cb5cb7e91c72c6ba17f | |
parent | d5841bd8b88b605b2e4379360b9259856e6f1950 [diff] |
[#613] Fix non-overlapping comparison of Thread channels
diff --git a/src/adaptations/device-layer/include/Weave/DeviceLayer/internal/GenericNetworkProvisioningServerImpl.ipp b/src/adaptations/device-layer/include/Weave/DeviceLayer/internal/GenericNetworkProvisioningServerImpl.ipp index c5bed46..6bcb81f 100644 --- a/src/adaptations/device-layer/include/Weave/DeviceLayer/internal/GenericNetworkProvisioningServerImpl.ipp +++ b/src/adaptations/device-layer/include/Weave/DeviceLayer/internal/GenericNetworkProvisioningServerImpl.ipp
@@ -897,7 +897,7 @@ // Verify a valid Thread channel was specified. if (netInfo.ThreadChannel != kThreadChannel_NotSpecified) { - if (netInfo.ThreadChannel < 11 && netInfo.ThreadChannel > 26) + if (netInfo.ThreadChannel < 11 || netInfo.ThreadChannel > 26) { statusProfileId = kWeaveProfile_NetworkProvisioning; statusCode = kStatusCode_InvalidNetworkConfiguration;