GNOME Bugzilla – Bug 645011
multiudpsink does not support setting a socket interface
Last modified: 2014-11-28 20:59:49 UTC
Created attachment 183620 [details] [review] Patch to add an interface_ipv4 prop to multiudpsink Multiudpsink creates a socket through which the multicast traffic is sent. The interface used is automatically the default system interface. This patch introduces a new property called interface_ipv4. If set, the ipv4 address specified becomes the origin of the multicast traffic (using the setsockopt option IP_MULTICAST_IF, and if the address is a valid interface). I looked carefully at ipv4 vs. ipv6. However the behavior of setsockopt doesn't seem to be consistent when it comes to checking the socket family and the data given. This is why I explicitely call this prop "_ipv4". I attach a patch for this feature.
Confirmed that this is a valid requirement. Did not look at the patch. IMO, calling the property "interface" is fine. We can just give a warning for ipv6.
ping <maintainer> We use this patch, it works and is really useful ;-) Is there still something needed to push this upstream?
Comment on attachment 183620 [details] [review] Patch to add an interface_ipv4 prop to multiudpsink This needs to be ported to 1.0 first. I think it's useful, but isn't there something else that can be used for IPv6 too? For the source there's API to select an interface by its name.
I think this was fixed by commit 11ed7c037329f71be337669f3e4b27b550ebf713 Author: Rasmus Rohde <rohde@duff.dk> Date: Wed Oct 10 10:55:28 2012 +0200 multiudpsink: add multicast-iface property udpsrc already has support for setting the multicast interface, which is useful for multi-homed machines. This patch adds the same code to the multiudpsink. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=685864