localhost connections, and also enable X forwarding in such a way that
it will attempt to connect to a Unix-domain X server socket, an
assertion will fail when proxy_for_destination() tries to call
sk_getaddr(). Fix by ensuring that Unix-domain sockets are _never_
proxied, since they fundamentally can't be.
git-svn-id: svn://svn.tartarus.org/sgt/putty@9688
cda61777-01e9-0310-a592-
d414129be87e
void sk_getaddr(SockAddr addr, char *buf, int buflen);
int sk_hostname_is_local(char *name);
int sk_address_is_local(SockAddr addr);
void sk_getaddr(SockAddr addr, char *buf, int buflen);
int sk_hostname_is_local(char *name);
int sk_address_is_local(SockAddr addr);
+int sk_address_is_special_local(SockAddr addr);
int sk_addrtype(SockAddr addr);
void sk_addrcopy(SockAddr addr, char *buf);
void sk_addr_free(SockAddr addr);
int sk_addrtype(SockAddr addr);
void sk_addrcopy(SockAddr addr, char *buf);
void sk_addr_free(SockAddr addr);
const char *exclude_list;
/*
const char *exclude_list;
/*
+ * Special local connections such as Unix-domain sockets
+ * unconditionally cannot be proxied, even in proxy-localhost
+ * mode. There just isn't any way to ask any known proxy type for
+ * them.
+ */
+ if (addr && sk_address_is_special_local(addr))
+ return 0; /* do not proxy */
+
+ /*
* Check the host name and IP against the hard-coded
* representations of `localhost'.
*/
* Check the host name and IP against the hard-coded
* representations of `localhost'.
*/
+int sk_address_is_special_local(SockAddr addr)
+{
+ return addr->superfamily == UNIX;
+}
+
int sk_addrtype(SockAddr addr)
{
SockAddrStep step;
int sk_addrtype(SockAddr addr)
{
SockAddrStep step;
+int sk_address_is_special_local(SockAddr addr)
+{
+ return 0; /* no Unix-domain socket analogue here */
+}
+
int sk_addrtype(SockAddr addr)
{
SockAddrStep step;
int sk_addrtype(SockAddr addr)
{
SockAddrStep step;