summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlutzbichler <52852266+lutzbichler@users.noreply.github.com>2022-03-15 07:13:25 +0100
committerGitHub <noreply@github.com>2022-03-15 07:13:25 +0100
commit94b613049eae865266c4d636619d157fcf83d78d (patch)
treed44b1851b9064b23afe6867c63d4e70c388fd864
parent8634ad92b3d2e02d36a3bedb80a4775f57db3936 (diff)
parent2a3c993f19294db19527d92b30080e4fc305f1ad (diff)
downloadvSomeIP-94b613049eae865266c4d636619d157fcf83d78d.tar.gz
Merge pull request #314 from doschropa/add-support-for-broadcast-messages
Fix for issue #313, Handle service discovery messages from broadcast
-rw-r--r--implementation/endpoints/src/udp_server_endpoint_impl.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/implementation/endpoints/src/udp_server_endpoint_impl.cpp b/implementation/endpoints/src/udp_server_endpoint_impl.cpp
index bd6fc62..4cd6a71 100644
--- a/implementation/endpoints/src/udp_server_endpoint_impl.cpp
+++ b/implementation/endpoints/src/udp_server_endpoint_impl.cpp
@@ -338,6 +338,9 @@ void udp_server_endpoint_impl::join_unlocked(const std::string &_address) {
boost::asio::socket_base::reuse_address optionReuseAddress(true);
multicast_socket_->set_option(optionReuseAddress, ec);
boost::asio::detail::throw_error(ec, "reuse address in multicast");
+ boost::asio::socket_base::broadcast optionBroadcast(true);
+ multicast_socket_->set_option(optionBroadcast, ec);
+ boost::asio::detail::throw_error(ec, "set broadcast option");
multicast_socket_->bind(*multicast_local_, ec);
boost::asio::detail::throw_error(ec, "bind multicast");