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 687782 - udpsrc does not handle EHOSTUNREACH for Linux as it does for Win32
udpsrc does not handle EHOSTUNREACH for Linux as it does for Win32
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.x
Other Linux
: Normal normal
: 1.1.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 687781 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-11-06 16:29 UTC by Robert Krakora
Modified: 2012-11-09 14:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Robert Krakora 2012-11-06 16:29:41 UTC
I have found that the same code that was added to udpsrc for WSAECONNRESET for
WIN32 is also needed for EHOSTUNREACH for Linux.  I have spend the last two
days tracking this down and would not have found it for some time had the
WSAECONNRESET fix for WIN32 not been present in the code.

#ifdef G_OS_WIN32
      /* WSAECONNRESET for a UDP socket means that a packet sent with udpsink
       * generated a "port unreachable" ICMP response. We ignore that and try
       * again. */
      if (WSAGetLastError () == WSAECONNRESET) {
        g_free (pktdata);
        pktdata = NULL;
        goto retry;
      }
      if (WSAGetLastError () != WSAEINTR)
        goto receive_error;
#else
      /* EHOSTUNREACH for a UDP socket means that a packet sent with udpsink
       * generated a "port unreachable" ICMP response. We ignore that and try
       * again. */

      if (errno == EHOSTUNREACH) {
        g_free (pktdata);
        pktdata = NULL;
        goto retry;
      }
      if (errno != EAGAIN && errno != EINTR)
        goto receive_error;
#endif
Comment 1 Sebastian Dröge (slomo) 2012-11-09 10:05:17 UTC
*** Bug 687781 has been marked as a duplicate of this bug. ***
Comment 2 Sebastian Dröge (slomo) 2012-11-09 10:23:30 UTC
commit c70ba7765a14ec6d3adef468dcd4454df9dc5c3a
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Fri Nov 9 11:22:30 2012 +0100

    udpsrc: Also clear GError

commit b86d20e45baaaf284aeb4e4d677718fb1364bd9e
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Fri Nov 9 11:20:27 2012 +0100

    udpsrc: Don't error out if we get an ICMP destination-unreachable message when trying to read packets
    
    See bug #529454 and #687782 and commit
    751f2bb3646f2beff3698c9f09900dbd0ea08abb
Comment 3 Robert Krakora 2012-11-09 12:09:53 UTC
Hi Sebastian,

My bug report is in regarsd to Linux and not Windows as Youness bug report and patch was.  Did you notice this?

Best Regards,

Rob Krakora
Comment 4 Sebastian Dröge (slomo) 2012-11-09 14:26:51 UTC
Yes, I only referenced the other bug for more information about the issue.