]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: client: Tunneled https peer addresses were not compared properly.
authorStephan Bosch <stephan@rename-it.nl>
Tue, 22 Sep 2015 18:16:51 +0000 (21:16 +0300)
committerStephan Bosch <stephan@rename-it.nl>
Tue, 22 Sep 2015 18:16:51 +0000 (21:16 +0300)
The https_name field was ignored in that case.

src/lib-http/http-client-peer.c

index 0de28f077e21b66ff91ffa46df1b9c66742a51bc..79a3dabe86254483cdd5f2a90a4c51ce68a01fc3 100644 (file)
@@ -88,7 +88,8 @@ int http_client_peer_addr_cmp
                        return ret;
                if (peer1->a.tcp.port != peer2->a.tcp.port)
                        return (peer1->a.tcp.port > peer2->a.tcp.port ? 1 : -1);
-               if (peer1->type != HTTP_CLIENT_PEER_ADDR_HTTPS)
+               if (peer1->type != HTTP_CLIENT_PEER_ADDR_HTTPS &&
+                       peer1->type != HTTP_CLIENT_PEER_ADDR_HTTPS_TUNNEL)
                        return 0;
                return null_strcmp
                        (peer1->a.tcp.https_name, peer2->a.tcp.https_name);