]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: ssl: switch to conn_get_dst() to retrieve the destination address
authorWilly Tarreau <w@1wt.eu>
Wed, 17 Jul 2019 09:29:32 +0000 (11:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 19 Jul 2019 11:50:09 +0000 (13:50 +0200)
This replaces conn_get_to_addr() and the subsequent check.

src/ssl_sock.c

index 62b85d1431d730400a78903b2010bc3650a0241f..9b53a917f3f7da1b332eba830ec317950982335e 100644 (file)
@@ -2083,8 +2083,7 @@ ssl_sock_generate_certificate_from_conn(struct bind_conf *bind_conf, SSL *ssl)
        unsigned int key;
        struct connection *conn = SSL_get_ex_data(ssl, ssl_app_data_index);
 
-       conn_get_to_addr(conn);
-       if (conn->flags & CO_FL_ADDR_TO_SET) {
+       if (conn_get_dst(conn)) {
                key = ssl_sock_generated_cert_key(&conn->addr.to, get_addr_len(&conn->addr.to));
                if (ssl_sock_assign_generated_cert(key, bind_conf, ssl))
                        return 1;