Commit Graph

16 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 88d9c05e3c expand IPv4 in expand_unspecified_address 2020-01-19 08:27:33 +01:00
arvidn 0961427b50 expand unspecified to loopback as well 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 af3d084092 convert the duplex enum into a flags field, on listen_socket_t and listen_endpoint 2020-01-06 20:22:55 +01:00
Alden Torres 8d379dd944 fixing warnings in tests code, part3 2018-01-25 09:09:21 +01:00
Steven Siloti e0dcd34352 convert m_listen_sockets to a vector of shared_ptr 2017-07-21 19:18:43 -07:00
Steven Siloti 0f30815d8f Revert "don't move listen_socket_t when deleting sockets"
This reverts commit 718c5f0dcb.
2017-07-21 19:18:43 -07:00
Steven Siloti 389b4eb3f2 make listen_socket_t non-copyable and non-movable (#2137)
The DHT stores a pointer to this struct so it must not be copied or moved once
it is stored in m_listen_sockets.
2017-07-10 10:14:36 -07:00
Steven Siloti 718c5f0dcb don't move listen_socket_t when deleting sockets
Pointers to listen_socket_t are stored in dht_tracker, so they
cannot be copied or moved once they are added to m_listen_sockets.

listen_socket_t should really be made non-copyable and non-moveable, but the
socket creation path needs to be refactored before that can be done.
2017-07-08 08:42:04 -07:00
Arvid Norberg 1af17be046 use enum class for ssl bool in listen socket (#1960)
use enum class for ssl bool in listen socket. use std::array instead of C array. make test_listen_socket a bit more compact
2017-04-30 21:11:42 -04:00
Steven Siloti fd50630020 announce to trackers for all listen interfaces 2017-04-30 08:11:56 -04:00
arvidn d138f02424 introduce lt namespace alias 2017-04-23 23:43:58 -04:00
Steven Siloti 64fed14ccc split tests and only use IPv4 addresses 2016-11-23 01:09:05 -05:00
Steven Siloti ae3a39fc05 disable test_listen_socket if we don't have ipv6 support
Do we even still need to support building without ipv6?
2016-11-23 01:09:05 -05:00
Steven Siloti 06c53a41d1 revisions based on code review
Moved the logic to determine which sockets to keep to a separate function and
add unit tests for it.

Store the port which was originally specified for a listen socket so that we
can match sockets reliably even with port retries.
2016-11-23 01:09:05 -05:00