face: bugfix of MulticastUdpFace receiving packets from all available NICs on Linux
Now on Linux the creation of MulticastUdpFace requires
CAP_NET_RAW capability if the name of the interface is specified
Change-Id: Iff53035371fb26c6ee40e1065a0935e5ed16dc60
Refs: #1475
diff --git a/daemon/face/udp-factory.hpp b/daemon/face/udp-factory.hpp
index 8d0494c..fa146ad 100644
--- a/daemon/face/udp-factory.hpp
+++ b/daemon/face/udp-factory.hpp
@@ -115,6 +115,13 @@
* If an unicast face is already active on the same local NIC and port, the
* creation fails and an exception is thrown
*
+ * \param networkInterfaceName name of the network interface on which the face will be bound
+ * (Used only on multihomed linux machine with more than one MulticastUdpFace for
+ * the same multicast group. If specified, will requires CAP_NET_RAW capability)
+ * An empty string can be provided in other system or in linux machine with only one
+ * MulticastUdpFace per multicast group
+ *
+ *
* \returns always a valid pointer to a MulticastUdpFace object, an exception
* is thrown if it cannot be created.
*
@@ -125,12 +132,14 @@
*/
shared_ptr<MulticastUdpFace>
createMulticastFace(const udp::Endpoint& localEndpoint,
- const udp::Endpoint& multicastEndpoint);
+ const udp::Endpoint& multicastEndpoint,
+ const std::string& networkInterfaceName = "");
shared_ptr<MulticastUdpFace>
createMulticastFace(const std::string& localIp,
const std::string& multicastIp,
- const std::string& multicastPort);
+ const std::string& multicastPort,
+ const std::string& networkInterfaceName = "");
// from Factory
virtual void