Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try next IP address when sending first session establishment message fails. #26308

Conversation

bzbarsky-apple
Copy link
Contributor

If DNS-SD discovery comes back with an IP that is not routable for some reason, or if there os some other synchronous error when trying to kick off session establishment, move on to the next IP (just like we would for an async session establishment error), instead of just aborting the session establishment process altogether.

The change in SetUpCodePairer::ConnectToDiscoveredDevice just moves on to the next element in our list, if any.

The change in OperationalSessionSetup::UpdateDeviceData adds the TryNextResult call, but also restructures things to have early returns instead of deep nesting of ifs.

Fixes #26307

…fails.

If DNS-SD discovery comes back with an IP that is not routable for some reason,
or if there os some other synchronous error when trying to kick off session
establishment, move on to the next IP (just like we would for an async session
establishment error), instead of just aborting the session establishment process
altogether.

The change in SetUpCodePairer::ConnectToDiscoveredDevice just moves on to the
next element in our list, if any.

The change in OperationalSessionSetup::UpdateDeviceData adds the TryNextResult
call, but also restructures things to have early returns instead of deep nesting
of ifs.

Fixes project-chip#26307
@github-actions
Copy link

PR #26308: Size comparison from 309e9f1 to 322f431

Increases (1 build for mbed)
platform target config section 309e9f1 322f431 change % change
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2494888 2495000 112 0.0
.text 1457572 1457684 112 0.0
Full report (1 build for mbed)
platform target config section 309e9f1 322f431 change % change
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2494888 2495000 112 0.0
.bss 216296 216296 0 0.0
.data 5144 5144 0 0.0
.text 1457572 1457684 112 0.0

@cecille cecille requested a review from mlepage-google May 1, 2023 20:11
@bzbarsky-apple bzbarsky-apple merged commit f9339cc into project-chip:master May 4, 2023
@bzbarsky-apple bzbarsky-apple deleted the try-next-ip-on-EstablishSession-failure branch May 4, 2023 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add fallback to next IP when trying to send a Sigma1 or PBKDFParamRequest message fails
3 participants