Feature #2966

virtphy should have a localhost-only mode

Added by stsp almost 3 years ago. Updated 11 months ago.

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


Spec Reference:


I am using a virual-um setup on my laptop for osmocom development and testing without additional hardware.

In this situation I do not want virtphy's traffic leaking to the local network,
however the traffic currently leaks.

As a workaround, virtphy could be run in a separate network namespace or a virtual machine.
But this issue seeks a solution which works without resorting to a separate network stack.

Blocking the traffic with iptables leads to errors on virtphy's socket, and adding a route to 224/4 via lo does
not have the desired effect as multicast traffic is still routed towards the default route.

Possible solutions:
Harald suggested trying to set the TTL of multicast packets to 0, and there's also the IP_MULTICAST_IF socket option
which could be used to bind virtphy to a specific interface.


#1 Updated by stsp almost 3 years ago

  • Priority changed from Normal to Low

#2 Updated by laforge over 1 year ago

  • Assignee deleted (stsp)

#3 Updated by laforge 11 months ago

  • Assignee set to laforge
  • % Done changed from 0 to 10

using osmo_sock_mcast_ttl_set(ofd->fd, 0) prevents any of the multicast IP packets from being broadcast over the network. As an interesting side-effect, it also makes the GSMTAP IP not show up in any pcap capture anymore, neither on lo, nor any, nor the physical ethernet. The latter makes somewhat sense - but is of course not useful for debugging while operating real networks.

#4 Updated by laforge 11 months ago

  • Status changed from New to In Progress

Patch in adds vty config option on BTS side to configure multicast TTL.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)