1. 22 Mar, 2019 1 commit
  2. 21 Mar, 2019 1 commit
  3. 25 Feb, 2019 1 commit
  4. 11 Dec, 2018 1 commit
  5. 15 Jun, 2018 1 commit
  6. 11 Jun, 2018 1 commit
    • Jehan's avatar
      gio: C_IN is defined in recent Android headers. · 63103534
      Jehan authored
      C_IN macro was added years ago in bcbaf1be, using same value as the
      internal code of Android with the reasonning that "some parts of the API
      used by the resolver objects is not public in the Android NDK (yet)".
      Well since then things are changed, since it is definitely available (at
      least on the API 22 of Android which I am using) in the public header
      arpa/nameser_compat.h.
      Let's just add a #ifndef to handle both cases when you build with an
      older or recent API.
      63103534
  7. 26 Mar, 2018 1 commit
  8. 02 Feb, 2018 1 commit
    • Philip Withnall's avatar
      gio: Port GThreadedResolver to use res_nquery() to fix thread-safety · 40be86bb
      Philip Withnall authored
      res_query() uses global state in the form of the struct __res_state
      which contains the contents of resolv.conf (and other things). On Linux,
      this state seems to be thread-local, so there is no problem. On OS X,
      however, it is not, and hence multiple res_query() calls from parallel
      threads will compete and return bogus results.
      
      The fix for this is to use res_nquery(), introduced in BIND 8.2, which
      takes an explicit state argument. This allows us to manually store the
      state thread-locally. If res_nquery() isn’t available, we fall back to
      res_query(). It should be available on OS X though. As a data point,
      it’s available on Fedora 27.
      
      There’s a slight complication in the fact that OS X requires the state
      to be freed using res_ndestroy() rather than res_nclose(). Linux uses
      res_nclose().
      
      (See, for example, the NetBSD man page:
      https://www.unix.com/man-page/netbsd/3/res_ninit/. The Linux one is
      incomplete and not so useful:
      http://man7.org/linux/man-pages/man3/resolver.3.html.)
      
      The new code will call res_ninit() once per res_nquery() task. This is
      not optimal, but no worse than before — since res_query() was being
      called in a worker thread, on Linux, it would implicitly initialise the
      thread-local struct __res_state when it was called. We’ve essentially
      just made that explicit. In practical terms, this means a
      stat("/etc/resolv.conf") call per res_nquery() task.
      
      In future, we could improve this by using an explicit thread pool with
      some manually-created worker threads, each of which initialises a struct
      __res_state on spawning, and only updates it on receiving
      the #GResolver::reload signal.
      Signed-off-by: Philip Withnall's avatarPhilip Withnall <withnall@endlessm.com>
      
      https://bugzilla.gnome.org/show_bug.cgi?id=792050
      40be86bb
  9. 11 Sep, 2017 1 commit
    • Daniel Macks's avatar
      Avoid setting unused variables (-Wself-assign) · 190f64a0
      Daniel Macks authored
      Setting a variable and then assigning it to itself avoids
      -Wunused-but-set-variable but this specific trick is now caught by
      -Wself-assign. Instead, actually use the value or don't bother
      assigning it at all:
      
      gdbusauth.c: call g_data_input_stream_read_byte() in void context
      gdbusauthmechanismsha1.c: value is actually used
      gdbusmessage.c: use consistent preprocessor-token protection
      gthreadedresolver.c: skip over bytes in data blob
      httpd.c: do something useful with the value
      
      https://bugzilla.gnome.org/show_bug.cgi?id=745723
      190f64a0
  10. 29 May, 2017 1 commit
  11. 12 Oct, 2016 1 commit
  12. 29 Jun, 2016 1 commit
  13. 13 Oct, 2015 1 commit
  14. 23 Jul, 2014 1 commit
  15. 25 Apr, 2014 1 commit
  16. 24 Apr, 2014 1 commit
  17. 15 Feb, 2014 1 commit
    • Dan Winship's avatar
      gio: don't accept nonstandard IPv4 "numbers-and-dots" addresses · 5575a3e9
      Dan Winship authored
      In addition to the standard "192.168.1.1" format, there are numerous
      legacy IPv4 address formats (such as "192.168.257",
      "0xc0.0xa8.0x01.0x01", "0300.0250.0001.0001", "3232235777", and
      "0xc0a80101"). However, none of these forms are ever used any more
      except in phishing attempts. GLib wasn't supposed to be accepting
      these addresses (neither g_hostname_is_ip_address() nor
      g_inet_address_new_from_string() recognizes them), but getaddrinfo()
      accepts them, and so the parts of gio that use getaddrinfo()
      accidentally did accept those formats.
      
      Fix GNetworkAddress and GResolver to reject these address formats.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=679957
      5575a3e9
  18. 31 Jan, 2014 1 commit
  19. 08 Dec, 2013 1 commit
  20. 29 Sep, 2013 2 commits
  21. 16 Apr, 2013 1 commit
  22. 02 Apr, 2013 1 commit
  23. 12 Dec, 2012 1 commit
  24. 28 Nov, 2012 2 commits
  25. 09 Nov, 2012 1 commit
  26. 05 Nov, 2012 1 commit
  27. 10 Oct, 2012 1 commit
  28. 16 Apr, 2012 1 commit
  29. 05 Oct, 2011 1 commit
  30. 04 Oct, 2011 1 commit
  31. 20 Sep, 2011 1 commit
  32. 09 Sep, 2011 1 commit
  33. 31 May, 2011 1 commit
  34. 07 Jul, 2010 1 commit
  35. 23 Jul, 2009 1 commit
  36. 15 May, 2009 1 commit
    • Alexander Larsson's avatar
      Fix deadlock in threaded resolver · a258ec3b
      Alexander Larsson authored
      When you're using the threaded resolver and using a sync call
      without a cancellable the resolve_sync forgot to unlock the
      initial req->mutex lock, leading to a deadlock when unrefing
      the request.
      a258ec3b
  37. 03 May, 2009 1 commit
  38. 22 Apr, 2009 1 commit
    • Dan Winship's avatar
      Add GResolver, a glib-ish interface to DNS · c94d3f92
      Dan Winship authored
      GResolver provides asynchronous (and synchronous-but-cancellable) APIs
      for resolving hostnames, reverse-resolving IP addresses back to
      hostnames, and resolving SRV records. Part of #548466.
      c94d3f92