UCT: check reachability using the routing table
What
Add a new reachability check mode for IP-based lanes.
Why ?
Currently, the reachability of IP-based lanes is only verified by checking if the local and remote addresses share the same subnet. If they do, the remote address is considered reachable. However, we want to introduce an additional reachability check (and mode) that considers non-local addresses. This will allow us to determine if the remote address is reachable based on routing information, not just subnet matching.
How ?
When the reachability mode is set to "route," the routing table will be consulted to verify reachability based on the specified interface and destination address.
@amastbaum as discussed f2f, let's first understand the recv / buffer len, then consider whether we need to change anything in UCS sock.
@yosefe I was mistaken in thinking that the total message size is written at the beginning of the message. Instead, it represents the size of each individual netlink message (i.e. a single routing table entry).
The only approach I’ve found so far is to call ucs_socket_recv_nb with the MSG_TRUNC | MSG_PEEK flags which allow you to determine the entire message size (the one stored in the receive queue) without fully reading or flushing it.
@yosefe I was mistaken in thinking that the total message size is written at the beginning of the message. Instead, it represents the size of each individual netlink message (i.e. a single routing table entry). The only approach I’ve found so far is to call
ucs_socket_recv_nbwith theMSG_TRUNC | MSG_PEEKflags which allow you to determine the entire message size (the one stored in the receive queue) without fully reading or flushing it.
Sounds good - let's use MSG_TRUNC | MSG_PEEK