Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor bugfixes #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Dlep.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,21 @@ Dlep::start_dlep()
session_acceptor =
new boost::asio::ip::tcp::acceptor(io_service_,
boost::asio::ip::tcp::endpoint(session_address, session_port));

// Set the socket's TTL to the session-ttl config parameter
// if it exists.

try
{
unsigned int ttl;
dlep_client.get_config_parameter("session-ttl", &ttl);
session_acceptor->set_option(boost::asio::ip::unicast::hops(ttl));
}
catch (LLDLEP::DlepClient::BadParameterName)
{
// Let the default TTL take effect.
}

start_async_accept();
}
else // we're the router
Expand Down
2 changes: 1 addition & 1 deletion PeerDiscovery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ PeerDiscovery::send_peer_offer(boost::asio::ip::udp::endpoint to_endpoint)
}

boost::asio::ip::udp::endpoint send_endpoint(to_endpoint.address(),
udp_port);
to_endpoint.port());
msg << "Sending signal to " << send_endpoint;
LOG(DLEP_LOG_INFO, msg);

Expand Down
11 changes: 6 additions & 5 deletions config/modem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,18 @@ as a modem.
<local-type>modem</local-type>
<discovery-enable>1</discovery-enable>

<!-- change this to reflect your chosen interface -->
<!-- change this to reflect your chosen interface -->
<discovery-iface>eth0</discovery-iface>

<!-- override default privileged port 854 -->
<discovery-ttl>255</discovery-ttl>
<session-ttl>255</session-ttl>
<!-- override default privileged port 854 -->
<discovery-port>4854</discovery-port>

<!-- override default privileged address 224.0.0.117 -->
<!-- override default privileged address 224.0.0.117 -->
<discovery-mcast-address>225.0.0.117</discovery-mcast-address>
<discovery-interval>60</discovery-interval>

<!-- override default privileged port 854 -->
<!-- override default privileged port 854 -->
<session-port>4854</session-port>
<heartbeat-interval>60</heartbeat-interval>
<heartbeat-threshold>2</heartbeat-threshold>
Expand Down