GGist / ssdp-rs

Simple Service Discovery Protocol In Rust
Apache License 2.0
42 stars 13 forks source link

fix: `SearchResponse::unicast` does not work on multihomed networks #23

Closed icorderi closed 8 years ago

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 57.969% when pulling 303268d6d2ef8dcbb1b9a0229bdf5c3eea41b1c5 on icorderi:fix/multihomed into c86b63f5c4c3e5b33ce9c4aafd8a3a7301357fb5 on GGist:master.

icorderi commented 8 years ago

SearchRequest::unicast has the same issue. The problem is here, that loop will fail the moment the destination is not reachable through that interface.

The behavior on this patch is to reach the destination through whatever network you can. If at least one networked was reachable, we shouldn't fail.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 54.775% when pulling 04af40cbe6e260df071fb7b25257c49c23ed2c66 on icorderi:fix/multihomed into b8b2e29e018ad19cb8d2aed6ccd6c6e66fa0bb18 on GGist:master.

GGist commented 8 years ago

Good catch.

For SearchRequest well probably have to detect when an address not available error occured and ignore it but return early on all other errors.

icorderi commented 8 years ago

@GGist yes, the unicast on SearchRequest will require a bit more work. Do you want to leave a bug open for it as a reminder?