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

IPAddress::FromSockAddr falls through to return Any — is this correct? #10800

Closed
kpschoedel opened this issue Oct 21, 2021 · 0 comments · Fixed by #13049
Closed

IPAddress::FromSockAddr falls through to return Any — is this correct? #10800

kpschoedel opened this issue Oct 21, 2021 · 0 comments · Fixed by #13049
Assignees

Comments

@kpschoedel
Copy link
Contributor

Problem

https://github.com/project-chip/connectedhomeip/pull/10791/files#r734003947

Proposed Solution

Investigate and resolve.

@kpschoedel kpschoedel self-assigned this Oct 21, 2021
kpschoedel added a commit to kpschoedel/connectedhomeip that referenced this issue Dec 15, 2021
#### Problem

A review raised questions about failure cases of `IPAddress::FromSockAddr`
(see link in the issue for details).

Fixes  project-chip#10800 _IPAddress::FromSockAddr falls through to return Any — is this correct?_

#### Change overview

- Replace `FromSockAddr(SockAddr)` with `GetIPAddressFromSockAddr()`
  with an explicit error return.
- Change its main use, `InterfaceIterator::GetAddress()`, to also
  have an explicit error return.

#### Testing

CI
kpschoedel added a commit to kpschoedel/connectedhomeip that referenced this issue Dec 15, 2021
#### Problem

A review raised questions about failure cases of `IPAddress::FromSockAddr`
(see link in the issue for details).

Fixes  project-chip#10800 _IPAddress::FromSockAddr falls through to return Any — is this correct?_

#### Change overview

- Replace `FromSockAddr(SockAddr)` with `GetIPAddressFromSockAddr()`
  with an explicit error return.
- Change its main use, `InterfaceIterator::GetAddress()`, to also
  have an explicit error return.

#### Testing

CI
kpschoedel added a commit to kpschoedel/connectedhomeip that referenced this issue Dec 15, 2021
#### Problem

A review raised questions about failure cases of `IPAddress::FromSockAddr`
(see link in the issue for details).

Fixes  project-chip#10800 _IPAddress::FromSockAddr falls through to return Any — is this correct?_

#### Change overview

- Replace `FromSockAddr(SockAddr)` with `GetIPAddressFromSockAddr()`
  with an explicit error return.
- Change its main use, `InterfaceIterator::GetAddress()`, to also
  have an explicit error return.

#### Testing

CI (`GetAddress` is unit tested).
andy31415 pushed a commit that referenced this issue Dec 16, 2021
#### Problem

A review raised questions about failure cases of `IPAddress::FromSockAddr`
(see link in the issue for details).

Fixes  #10800 _IPAddress::FromSockAddr falls through to return Any — is this correct?_

#### Change overview

- Replace `FromSockAddr(SockAddr)` with `GetIPAddressFromSockAddr()`
  with an explicit error return.
- Change its main use, `InterfaceIterator::GetAddress()`, to also
  have an explicit error return.

#### Testing

CI (`GetAddress` is unit tested).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant