Project

General

Profile

Actions

Bug #3497

closed

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

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

Status:
Resolved
Priority:
Immediate
Assignee:
Category:
-
Target version:
-
Start date:
08/23/2018
Due date:
% Done:

100%

Spec Reference:

Description

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.

Actions #1

Updated by dexter over 5 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:
https://gerrit.osmocom.org/#/c/libosmocore/+/10587 socket: add flag to enforce SO_REUSEADDR on UDP sockets
https://gerrit.osmocom.org/#/c/libosmocore/+/10588 gsmtap_util: make sure SO_REUSEADDR is applied for GSMTAP
https://gerrit.osmocom.org/#/c/osmo-bts/+/10589 osmo_mcast_sock: make sure SO_REUSEADDR is applied
https://gerrit.osmocom.org/#/c/osmocom-bb/+/10590 osmo_mcast_sock: make sure SO_REUSEADDR is applied

Actions #2

Updated by dexter over 5 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.

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)