Re: [Boost-bugs] [Boost C++ Libraries] #6446: Mulicast receiver does not work

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6446: Mulicast receiver does not work
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-10-31 00:19:44


#6446: Mulicast receiver does not work
-------------------------------+----------------------------
  Reporter: dieter.mayer@… | Owner: chris_kohlhoff
      Type: Bugs | Status: reopened
 Milestone: To Be Determined | Component: asio
   Version: Boost 1.47.0 | Severity: Problem
Resolution: | Keywords: Multicast
-------------------------------+----------------------------
Changes (by Ludwig Schultze):

 * status: closed => reopened
 * resolution: worksforme =>

Comment:

 Request to reopen and fix receiver.cpp.

 sender.cpp is ok. Like Chris wrote, the routing table of the OS can be
 used to select the network interface through which to send outgoing
 multicast traffic. But sending was never the topic of this bug.

 There might exist operating systems that use the routes for outgoing
 multicast traffic to also have the network interfaces join multicast
 groups for incoming traffic. At least Linux is not one of them.

 As a result, the following does not work on Linux. It is the shell
 transcript of an attempt to use the kernel routing tables to make
 receiver.cpp work as suggested by Chris:

 {{{
 # MCAST_IP=<your multicast group>
 # ETH0_IP=<your IP of eth0 network interface>
 # sudo route add $MCAST_IP dev eth0
 # ./receiver $ETH0_IP $MCAST_IP
 }}}

 This does not detect multicast packets of group MCAST_IP that arrive at
 eth0.

 The packets are only detected if receiver is invoked as

 {{{
 ./receiver 0.0.0.0 $MCAST_IP
 }}}

 but this receives also packets to the same port in all other multicast
 groups currently joined. Most likely because 0.0.0.0, being IPADDR_ANY,
 matches all multicast groups.

 Thanks to cgarcia for sharing the correct code.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/6446#comment:9>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:19 UTC