[Boost-bugs] [Boost C++ Libraries] #13463: Boost UDP multicast sender not using correct port

Subject: [Boost-bugs] [Boost C++ Libraries] #13463: Boost UDP multicast sender not using correct port
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2018-03-04 01:12:13


#13463: Boost UDP multicast sender not using correct port
---------------------------------------+----------------------------
 Reporter: anonymous | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost 1.66.0 | Severity: Showstopper
 Keywords: asio udp multicast sender |
---------------------------------------+----------------------------
 I follow this code to create a UDP multicast receiver:
 http://www.boost.org/doc/libs/1_66_0/doc/html/boost_asio/example/cpp11/multicast/sender.cpp

 I modify the code with these for predefined values:

 class receiver:

     short multicast_port = 13000;

 in main():

     //if (argc != 2) and the code for argv that follows are commented out

     sender s(io_context, boost::asio::ip::make_address("192.168.0.255"));

 The first 3 octets match that of the local network. I check with
 Wireshark. It shows me that the packages are sent with source port of
 53916, and destination port 0. Running the code again gives a source port
 of 59483, and destination port 0.

 What is causing the source port to be different from specified value? How
 can I force it to use the specified port number? Thanks.

-- 
Ticket URL: <https://svn.boost.org/trac10/ticket/13463>
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 : 2018-03-04 01:16:25 UTC