[Bug 771530] New: Multicast interface not used for group join setsockopt call

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Sep 16 11:57:09 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=771530

            Bug ID: 771530
           Summary: Multicast interface not used for group join setsockopt
                    call
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-rtsp-server
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: ian.arkver.dev at gmail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Using gst-rtsp-server git master as of commit
74c8a9f4cff34c99fe8e2dc1c7aec4749f9a1fcf against gstreamer and plugins 1.9.2
release tarballs.

I was getting ENODEV from the multicast group join setsockopt call unless I
have a default route on the machine. This seems to be known behaviour in Linux
when the imr_interface is "Any".

I added a call to gst_rtsp_media_factory_set_multicast_iface so my code
basically does this...

gst_rtsp_address_pool_add_range(pool, "239.255.7.0", "239.255.7.1", 5000, 5001,
16);
gst_rtsp_media_factory_set_address_pool(factory, pool);
gst_rtsp_media_factory_set_protocols(factory,
                GST_RTSP_LOWER_TRANS_UDP_MCAST);
gst_rtsp_media_factory_set_multicast_iface(factory, ipaddr);

(here ipaddr is the string "192.168.9.102", which is the local interface IP
addr)

But it seems like the multicast_iface address specified is not making it
through to the setsockopt call. Using strace I see this...

[pid   723] setsockopt(19, SOL_IP, IP_ADD_MEMBERSHIP,
{imr_multiaddr=inet_addr("239.255.7.0"), imr_interface=inet_addr("0.0.0.0")},
12) = -1 ENODEV (No such device)

But if I do "ip route add default dev eth0", then I get this...

[pid   676] setsockopt(19, SOL_IP, IP_ADD_MEMBERSHIP,
{imr_multiaddr=inet_addr("239.255.7.0"), imr_interface=inet_addr("0.0.0.0")},
12) = 0

and streaming works.

I'd have expected the string I specified in
gst_rtsp_media_factory_set_multicast_iface to show up in imr_interface.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list