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 573115 - [udpsink] set TTL and LOOP properties for multicast groups
[udpsink] set TTL and LOOP properties for multicast groups
Status: RESOLVED DUPLICATE of bug 588245
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-02-25 14:14 UTC by Jan Smout
Modified: 2009-08-31 10:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Set the TTL and loop properties for multicast groups (761 bytes, patch)
2009-02-25 14:17 UTC, Jan Smout
committed Details | Review
Set default multicast TTL value to 1 (519 bytes, patch)
2009-02-25 14:18 UTC, Jan Smout
none Details | Review

Description Jan Smout 2009-02-25 14:14:45 UTC
In commit e206f74bcea198673e6e64f04218d7c72a56efcd from 2008-05-21 19:35:50 (gst/udp/: Joining a multicast group and setting the loop/ttl properties are totally unrelated tasks are must be separ...), the functionality of gst_udp_join_group() was split in two functions. However, the body of the second (new) function - gst_udp_set_loop_ttl() - was set in an '#if 0 .... #endif' block. The result is that multicast streams have a default (multicast) TTL of 1 and only have significance in your own subnet. Result: your streams will not pass a single router.

I have two patches which I will attach shortly:

1- Make sure the TTL and loop properties are set when multicasting
2- Match the default multicast TTL to the (more sane?) default value of 1
Comment 1 Jan Smout 2009-02-25 14:17:16 UTC
Created attachment 129486 [details] [review]
Set the TTL and loop properties for multicast groups
Comment 2 Jan Smout 2009-02-25 14:18:05 UTC
Created attachment 129487 [details] [review]
Set default multicast TTL value to 1
Comment 3 Wim Taymans 2009-02-26 12:23:52 UTC
Commited the patch in Comment #1.

Why again do you want to set the default TTL to 1? Your previous comment seems to imply that a default TTL of 1 only makes sense in your own subnet and won't pass a single router, which seems a rather limiting default to me.

commit 474d9d7a9b9b32bfd66a558be468e7a5b588f992
Author: Jan Smout <jan dot smout at gmail dot com>
Date:   Thu Feb 26 13:19:31 2009 +0100

    udp: fix gst_udp_set_loop_ttl() again
    
    Fix the gst_udp_set_loop_ttl() function that was commented out in a
    previous commit. See #573115.

Comment 4 Jan Smout 2009-02-26 19:00:54 UTC
(In reply to comment #3)

Oops, I kind of forgot to motivate the second patch ...

I'm following the reasoning as explained in RFC1112. Quoting the RFC (second paragraph of section 6.1 "Extensions to the IP Service Interface" on page 4):

"""
First, the service interface should provide a way for the upper-layer
protocol to specify the IP time-to-live of an outgoing multicast
datagram, if such a capability does not already exist.  If the
upper-layer protocol chooses not to specify a time-to-live, it should
default to 1 for all multicast IP datagrams, so that an explicit
choice is required to multicast beyond a single network.
"""

To my opinion, the udpsink implementation should also follow this recommendation.


That said, another potential patch comes to mind: rename the udpsink ttl property to something like mc-ttl. This emphasizes that the property only affects multicast updsinks. One can go as far as to change the name throughout the sources for the same reason. This impacts gstmultiudpsink.c and gstudpnetutils.c.
Just let me know if you're interested in this patch. Otherwise, I won't spend the effort.
Comment 5 Sebastian Dröge (slomo) 2009-08-09 08:58:07 UTC
Wim, what's your opinion on this?
Comment 6 Wim Taymans 2009-08-31 10:19:40 UTC

*** This bug has been marked as a duplicate of bug 588245 ***