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 764897 - Using non IPv6-socket in IPv6 scope
Using non IPv6-socket in IPv6 scope
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.6.0
Other Linux
: Normal normal
: 1.8.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-04-11 14:12 UTC by Mats Lindestam
Modified: 2016-04-28 17:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Attached a patch that suggest a possible fix to the issue. (960 bytes, patch)
2016-04-11 14:12 UTC, Mats Lindestam
reviewed Details | Review
New patch base on the comment from Slomo (998 bytes, patch)
2016-04-25 13:12 UTC, Mats Lindestam
needs-work Details | Review
Updated patch (995 bytes, patch)
2016-04-26 06:11 UTC, Mats Lindestam
needs-work Details | Review
Patch after trying to rebase (993 bytes, patch)
2016-04-26 07:35 UTC, Mats Lindestam
committed Details | Review

Description Mats Lindestam 2016-04-11 14:12:22 UTC
Created attachment 325730 [details] [review]
Attached a patch that suggest a possible fix to the issue.

I am getting an assertion (g_socket_get_family: assertion ‘G_IS_SOCKET (socket)’ failed) in gst_multiudpsink_start (gst-plugins-good/gst/udp/gstmultiudpsink.c:1315). It seems that a non IPv6-socket is used. 

Attached a patch that suggest a possible fix to the issue.
Comment 1 Sebastian Dröge (slomo) 2016-04-12 07:10:29 UTC
Review of attachment 325730 [details] [review]:

::: gst/udp/gstmultiudpsink.c
@@ +1312,3 @@
   if (sink->socket_v6) {
     GST_DEBUG_OBJECT (sink, "using configured IPv6 socket");
+    g_return_val_if_fail (g_socket_get_family (sink->socket_v6) == 

So your problem is that you set "socket-v6" but keep "socket" at NULL?

I think this assertion should be
  (!socket || family(socket) == IPV6, FALSE)
Comment 2 Mats Lindestam 2016-04-25 13:12:14 UTC
Created attachment 326686 [details] [review]
New patch base on the comment from Slomo

New patch with code changes based on the comment from Slomo.
Comment 3 Mats Lindestam 2016-04-25 13:13:03 UTC
Thank you for the input in you comment slomo. I have added a new patch
Comment 4 Sebastian Dröge (slomo) 2016-04-25 16:06:30 UTC
Review of attachment 326686 [details] [review]:

::: gst/udp/gstmultiudpsink.c
@@ +1313,3 @@
     GST_DEBUG_OBJECT (sink, "using configured IPv6 socket");
+    g_return_val_if_fail (!sink->socket || (g_socket_get_family (sink->socket) ==
+        G_SOCKET_FAMILY_IPV6), FALSE);

This should be !=, not ==. It should fail if there is a ->socket and this ->socket is IPV6.
Comment 5 Mats Lindestam 2016-04-26 06:11:46 UTC
Created attachment 326720 [details] [review]
Updated patch
Comment 6 Sebastian Dröge (slomo) 2016-04-26 06:33:09 UTC
Comment on attachment 326720 [details] [review]
Updated patch

This doesn't apply cleanly to latest GIT master. Can you rebase?

Also while you're at it, the parenthesis around the x != y are unneeded :)


You said that you have a testcase for this, I wonder why it didn't fail with your previous patches that had different logic
Comment 7 Mats Lindestam 2016-04-26 06:53:23 UTC
Oki, will fix. :-)
Comment 8 Mats Lindestam 2016-04-26 07:30:34 UTC
I don't get it. Everything is up to date. There is nothing to rebase. :(
Comment 9 Mats Lindestam 2016-04-26 07:35:12 UTC
Created attachment 326723 [details] [review]
Patch after trying to rebase

Tried to rebase but everything seems to be updated.
Comment 10 Sebastian Dröge (slomo) 2016-04-26 08:05:41 UTC
commit 63c284c24ec08c8cdf976f819bcd20868766e57f
Author: Mats Lindestam <matslm@axis.com>
Date:   Mon Apr 25 15:03:14 2016 +0200

    multiudpsink: Allow setting "socket-v6" without setting "socket" too
    
    https://bugzilla.gnome.org/show_bug.cgi?id=764897