Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Routing table cannot be used to determine if remote address is reachable by local interface #74

Open
schien opened this issue Aug 21, 2014 · 3 comments

Comments

@schien
Copy link

schien commented Aug 21, 2014

In UDPSocket constructor clause 4 spec says an error should be thrown if the remote address is unreachable by any local interface (or designated local interface if localAddress is provided). However, the routing table can only provide the information of the best local interface to go. As I know it's not possible to determine if an remote address is reachable until you receive a packet from it.

@ClaesNilsson
Copy link
Contributor

Yes, it is not possible to confirm that a remote address is reachable until packets are received from it. However, I envision cases when it is possible to see, already when checking the routing table, that the requested remote address is not reachable as there is no interface in the routing table providing access to this remote address.

@schien
Copy link
Author

schien commented Aug 22, 2014

Default route will take care of this case if there is no specific rule for the requested remote address, right? This means we can only foresee a route failure when this host doesn't have a default gateway, which is a strange configuration to me. May I know what's the scenario we expect API user's can gain benefit from this error handling?

@ClaesNilsson
Copy link
Contributor

The wording in the specification is much based on the discussion in #36. Please have a look.

However, I don't have a strong opinion and can remove the statement about this error handling. It may try to cover a scenario that never can happen.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants