After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 652711 - udp: add support for IGMPv3 SSM (Source Specific Multicast RFC 4604)
udp: add support for IGMPv3 SSM (Source Specific Multicast RFC 4604)
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 740791
Blocks:
 
 
Reported: 2011-06-16 10:36 UTC by Julien Isorce
Modified: 2018-11-03 14:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
when joining a multicast stream, users can select the source they want to receive the stream from (12.13 KB, patch)
2011-06-16 10:36 UTC, Julien Isorce
none Details | Review
also add source-ip property (16.28 KB, patch)
2012-01-13 09:57 UTC, Julien Isorce
needs-work Details | Review
udpsrc: add support for IGMPv3 SSM (10.25 KB, patch)
2014-11-28 08:29 UTC, Julien Isorce
none Details | Review
udpsrc: add support for IGMPv3 SSM (11.58 KB, patch)
2017-02-06 17:22 UTC, Andreas Oberritter
none Details | Review
udpsrc: add support for IGMPv3 SSM (12.96 KB, patch)
2017-10-02 12:32 UTC, Julien Isorce
none Details | Review
udpsrc: add support for IGMPv3 SSM (13.42 KB, patch)
2017-10-16 11:53 UTC, Julien Isorce
none Details | Review
udpsrc: add support for IGMPv3 SSM (13.34 KB, patch)
2017-10-18 09:33 UTC, Julien Isorce
none Details | Review
udpsrc: add support for IGMPv3 SSM (14.18 KB, patch)
2017-10-18 09:39 UTC, Julien Isorce
none Details | Review
udpsrc: add support for IGMPv3 SSM (14.17 KB, patch)
2017-10-18 09:44 UTC, Julien Isorce
none Details | Review
udpsrc: add support for IGMPv3 SSM (14.20 KB, patch)
2017-10-24 08:40 UTC, Julien Isorce
none Details | Review

Description Julien Isorce 2011-06-16 10:36:42 UTC
Created attachment 190026 [details] [review]
when joining a multicast stream, users can select the source they want to receive the stream from

* Overview: for now when joining a multicast stream, users cannot select the source they want to receive the stream from.


* Additional Information: The kernel configuration determines which IGMP version to use. 

On linux you can select the minimum IGMP version to use.

On windows, you can only select the maximum IGMP version to use. IGMPv3 + SSM is avaible from winXP_SP1. On winXP (don't know on vista and seven) when a network interface sees a IGMPv1 or IGMPv2 it becomes impossible to send a IGMPv3 packet without restarting the network interface (http://support.microsoft.com/kb/815752)
Comment 1 Julien Isorce 2011-06-16 10:37:59 UTC
* Additional information on the attached patch (id=190026):

This is done by using IP_ADD_SOURCE_MEMBERSHIP socket option instead of IP_ADD_MEMBERSHIP.

This patch was compiled on both Windows and Linux, but only Windows tests were performed.
Comment 2 Julien Isorce 2011-06-16 13:47:52 UTC
I forgot to tell that the source has to be set using the following format 'udp://172.22.200.54@239.130.110.108:10108' through the 'uri' property.

We have not added a property 'source-ip' as it's done for 'multicast-group'
Comment 3 Julien Isorce 2012-01-13 09:57:33 UTC
Created attachment 205171 [details] [review]
also add source-ip property
Comment 4 Sebastian Dröge (slomo) 2012-01-13 10:50:38 UTC
Not sure how useful this is now, the plan would be to port the UDP (and all network plugins for that matter) to GIO in 0.11. Adding support for multicast stuff to GIO would be very useful though, see bug #667857
Comment 5 Sebastian Dröge (slomo) 2013-08-21 18:51:26 UTC
Anybody planning to port this to GIO and add support in the UDP plugin?
Comment 6 Tim-Philipp Müller 2014-11-25 17:56:44 UTC
Julien, are you planning to port this? If not, we should probably just close this bug.
Comment 7 Julien Isorce 2014-11-26 07:40:45 UTC
So I tried to port my patch to 1.x and gio but I found that even if "g_socket_join_multicast_group" has a "gboolean source-specific" parameter, there is no way to setup the source address (see ip_mreq_source / imr_sourceaddr in my original patch) 

The  "g_socket_join_multicast_group" implementation can be found here: https://git.gnome.org/browse/glib/tree/gio/gsocket.c#n2108

I missed something ? Otherwise gio needs to be improved first.
Comment 8 Tim-Philipp Müller 2014-11-26 14:03:59 UTC
Entirely possible that gio might need fixing up first.
Comment 9 Julien Isorce 2014-11-26 22:57:52 UTC
gio bug reported here https://bugzilla.gnome.org/show_bug.cgi?id=740791
Comment 10 Julien Isorce 2014-11-28 08:29:52 UTC
Created attachment 291706 [details] [review]
udpsrc: add support for IGMPv3 SSM
Comment 11 Sebastian Dröge (slomo) 2014-11-28 08:54:46 UTC
Comment on attachment 291706 [details] [review]
udpsrc: add support for IGMPv3 SSM

As this requires a changed GIO API it's not good to merge obviously ;) Otherwise it looks good though.

I think this just needs a new function in GLib with different parameter types.
Comment 12 Andreas Oberritter 2017-02-06 17:22:55 UTC
Created attachment 345045 [details] [review]
udpsrc: add support for IGMPv3 SSM

I rebased Julien's patch onto 1.6.4, which is old but newer than the original patch. It uses the newly added functions from Bugzilla #740791. It doesn't apply cleanly on master, though.
Comment 13 Julien Isorce 2017-10-02 12:32:27 UTC
Created attachment 360769 [details] [review]
udpsrc: add support for IGMPv3 SSM

Rebase on top of latest mater.
Comment 14 Andreas Oberritter 2017-10-16 11:23:08 UTC
There is a regression in gst_udp_parse_uri, causing access to uninitialized memory after having parsed a VLC-style URI without source address, e.g. "@239.35.10.4:10000".

You can find a fixed patch here (for 1.6.4 again), for your reference:
https://github.com/opendreambox/opendreambox/blob/krogoth/meta-opendreambox/recipes-multimedia/gstreamer/gstreamer1.0-plugins-good/0001-udpsrc-add-support-for-IGMPv3-SSM.patch
Comment 15 Julien Isorce 2017-10-16 11:53:23 UTC
Created attachment 361661 [details] [review]
udpsrc: add support for IGMPv3 SSM

Handle the case when no multicast-source is provided
Comment 16 Julien Isorce 2017-10-16 11:58:32 UTC
Hi Andreas, thx for reporting this, indeed there was a bug. I fixed one but could you make a diff if still needed, would be easier for me to see what your change fixes. Thx a lot
Comment 17 Andreas Oberritter 2017-10-16 12:49:13 UTC
At a second glance, I realized that the access to uninitialized memory was a problem caused by an earlier modification made to your patch by myself.

However, the problem I still see is here:

    if (source != NULL) {
      *source = g_strndup (location_start, location - location_start);
      GST_DEBUG ("source ip address set to '%s'", *source);
    }

*source becomes non-NULL, even if the string before '@' is empty. I therefore added location - location_start > 0 to the condition and set *source to NULL otherwise.

I currently can't download your raw patch from bugzilla, probably due to a problem with my local resolver and DNSSEC, so it's hard to apply and modify right now.
Comment 18 Julien Isorce 2017-10-18 09:33:15 UTC
Created attachment 361789 [details] [review]
udpsrc: add support for IGMPv3 SSM

Done, thx for reporting that.
Comment 19 Julien Isorce 2017-10-18 09:39:13 UTC
Created attachment 361790 [details] [review]
udpsrc: add support for IGMPv3 SSM

Just spotted a miror issue with previous patch related to iface, so this is fixed now.
Comment 20 Julien Isorce 2017-10-18 09:44:47 UTC
Created attachment 361791 [details] [review]
udpsrc: add support for IGMPv3 SSM

And another one.
Comment 21 Julien Isorce 2017-10-24 08:40:04 UTC
Created attachment 362158 [details] [review]
udpsrc: add support for IGMPv3 SSM

Set *source to NULL to fix uninitialized memory issue.
Comment 22 Julien Isorce 2017-12-13 10:24:17 UTC
Sebastian, Tim, the gio patch has landed 2 months ago in upstream glib. Do you want to review the attached patch for gstudpsrc and is it ok to land it before 1.14 ?

Maybe the element should output a GST_WARNING is one is trying to use the new property with glib < 2.56. In the patch it is currently silently ignored.
Comment 23 Sebastian Dröge (slomo) 2018-01-18 16:46:46 UTC
I would prefer to have the property implemented on our side in #ifdefs for older GLib versions. Conditional properties are a usability nightmare.
Comment 24 Julien Isorce 2018-01-18 16:51:08 UTC
Sure good idea, I can try to do it in the next 2 or 3 weeks if the 1.14 will not happen before.
But could you review current patch so that I will integrate remarks while integrating your suggestion. Thx!
Comment 25 Baby octopus 2018-03-15 09:36:38 UTC
Would be great to have this in 1.14 since glib 2.56 too is released now :)
Comment 26 Julien Isorce 2018-03-16 09:22:51 UTC
(In reply to Baby octopus from comment #25)
> Would be great to have this in 1.14 since glib 2.56 too is released now :)

Thx for letting us know. But I plan that for later. In the end I am not really keen to maintain a local copy the new glib functions g_socket_join_multicast_group_ssm / g_socket_leave_multicast_group_ssm .

Is there any precedence case like this ? i.e. where a new gst element property that depends on a newer glib ? Also note that in the attached patch the new property is added even for older glib versions (no ifdef)
Comment 27 GStreamer system administrator 2018-11-03 14:44:16 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/issues/46.