-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
The current outduct_element_config_t has a way to ensure a specific LTP local port with ltpSenderBoundPort but there is no way to do the equivalent thing with the outgoing UDP source port.
The current behavior uses a fixed bind port of "0" (meaning choose an ephemeral port) here
HDTN/common/udp/src/UdpBundleSource.cpp
Line 242 in 73e30db
| m_udpSocket.bind(boost::asio::ip::udp::endpoint(boost::asio::ip::udp::v4(), 0)); //bind to 0 (random ephemeral port) |
but this could be made a configuration from e.g. an option
udpSenderBoundPort.
Additionally, the current open() and bind() within UdpBundleSource::OnResolve() doesn't actually need to wait for the peer address resolution. Both open and bind can happen (and catch errros) in that class constructor.
If source port selection is allowed, the following should be enabled just before the bind() call to enable multiple sockets to use the same sort port
m_udpSocket.set_option(boost::asio::socket_base::reuse_address(true));Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels