Commit Graph

10 Commits

Author SHA1 Message Date
arvidn 1e4083b3fb rely less on the ability to enumerate the routing table reliably. Any IP address
explicitly specified is assumed to represent an externally available IP, unless
marked with the l-flag. If a device name or an unspecified address is used, they
are expanded and only for such expanded entries is there a heuristic to
determine which addresses are externally available and which are local. The
default is to assume it's local only, unless it has a globally routable IP
address or a default route can be found for the device.
2020-03-03 11:43:52 +01:00
arvidn 0a4a06ce74 apparently on VPNs it's common for the gateway for a route to be outside of the netmask of the network it's a router for. fix that in get_gateway 2020-02-08 23:03:10 +01:00
arvidn a53d3a8746 factor out get_gateway function and add unit tests. IPv6 gateways are not addressed in the same network, so we can't use match_addr_mask(). Assume all local IPv6 addresses do not have a gateway 2020-01-19 08:27:33 +01:00
arvidn 4ceb2ea467 limit tracker announces and SOCKS5 connection attempts to listen_socket_t that actually can reach the target 2020-01-19 08:27:33 +01:00
arvidn 96695fa714 fix build_netmask to treat the count as a prefix and add tests 2020-01-06 20:23:13 +01:00
Arvid Norberg b90564d418 remove the IPv6 enable/disable build config 2018-08-19 22:20:54 +02:00
Alden Torres 8d379dd944 fixing warnings in tests code, part3 2018-01-25 09:09:21 +01:00
arvidn d138f02424 introduce lt namespace alias 2017-04-23 23:43:58 -04:00
Alden Torres 1280c7f7ae is_ip_address refactor and minor code cleanup (#1828)
is_ip_address refactor and minor code cleanup
2017-03-18 11:07:17 -04:00
arvidn 666b6dc788 split out some more tests from test_primitives 2015-08-24 17:40:29 +02:00