Bug #3497

udp/gsmtap multicast is broken osmo-bts-virtual and virtphy

Added by dexter over 2 years ago. Updated over 2 years ago.

Target version:
Start date:
Due date:
% Done:


Spec Reference:


Unfortunately libosmocore change I4a8ffb8d598aca88801a4a0322944d7cdd8d4047 introduced than SO_REUSEADDR should be disabled when IPPROTO_UDP is used. Under normal conditions this makes sense and is also necessary to detect when two processes try to use the same port but for multicast situations like we have them with osmo-bts-virtual, virtphy and gsmtap in general this becomes a problem.


#1 Updated by dexter over 2 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 90

socket.c has now an additional flag (OSMO_SOCK_F_UDP_REUSEADDR) that the user can pass in order to restore the old behavior. Since we do not have much applications that use multicast I think this is a good compromise. Unfortunately it was not possible to set SO_REUSEADDR after calling the osmo_sock... API. This is because the the function would exit with an error. SO_REUSEADDR must be set before the bind(). Also using a flag looks cleaner to me than to modify the socket parameters by hand after the api-call.

See also: socket: add flag to enforce SO_REUSEADDR on UDP sockets gsmtap_util: make sure SO_REUSEADDR is applied for GSMTAP osmo_mcast_sock: make sure SO_REUSEADDR is applied osmo_mcast_sock: make sure SO_REUSEADDR is applied

#2 Updated by dexter over 2 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100

All the patches are through. Also I did not observe any new problems. The communication between osmo-bts-virtual and virtphy looks fine.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)