Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implement new address filter based on default route availability (#179)
* use mptcpd_addr_info to store known address list instead of using a plain sockaddr, use the mptcpd_addr_info structure, so that we can more easily include additional metadata. Additionally change the mptcpd_addr_info layout so that this don't break existing interface->addrs users. This make address management more efficent and will simplify the next patch. * add configuration flag for default route check This only adds the configuration-related bits, the actual check implementation is in the next patch. * implement route check for address notification if the relevant flag is enabled, do a route lookup for a default route at address creation time and notify the new address only if such route is found. In case of failure re-schedule the check with a small timeout and exponential backoff up to 3 times. That is intended to cope with e.g. DHCP clients configuring the address and the relevant route in order. Note that route lookup is async, an racing address removal can try to delete the relevant address object before the route lookup completes. Implement a simple refcount mechanism on the mptcp address object to avoid such issue. In a similar manner, route lookup can race with interface deletion. Instead of adding another ref-count, just lookup again the interface via the known ifindex in the async operation. Finally default route lookup for ipv4 does not really work on the Linux kernel: 'ip route get 0.0.0.0 ...' always returns a loopback route. To fetch the default route, lookup for a test-only address: as no host/network should use it, it should be reachable only via the default route. The gitlab workflows is update accordingly, explicitly building and installing the minimal required libell version
- Loading branch information