diff --git a/gio/gsimpleproxyresolver.c b/gio/gsimpleproxyresolver.c index 41136527f..53fdd1346 100644 --- a/gio/gsimpleproxyresolver.c +++ b/gio/gsimpleproxyresolver.c @@ -26,6 +26,7 @@ #include "gsimpleproxyresolver.h" #include "ginetaddress.h" +#include "ginetsocketaddress.h" #include "ginetaddressmask.h" #include "gnetworkingprivate.h" #include "gtask.h" @@ -264,9 +265,13 @@ ignore_host (GSimpleProxyResolver *resolver, if (priv->ignore_ips) { GInetAddress *iaddr; + GInetSocketAddress *isaddr = NULL; - iaddr = g_inet_address_new_from_string (host); - if (iaddr) + /* Grab the GInetAddress from the GInetSocketAddress in order to support + * scope ID. */ + isaddr = (GInetSocketAddress *) g_inet_socket_address_new_from_string (host, 0); + iaddr = (isaddr != NULL) ? g_inet_socket_address_get_address (isaddr) : NULL; + if (iaddr != NULL) { for (i = 0; i < priv->ignore_ips->len; i++) { @@ -278,11 +283,12 @@ ignore_host (GSimpleProxyResolver *resolver, break; } } - - g_object_unref (iaddr); - if (ignore) - return TRUE; } + + g_clear_object (&isaddr); + + if (ignore) + return TRUE; } if (priv->ignore_domains)