MINOR: connection: use sni as parameter for srv conn hash

The sni parameter is an input to the server connection hash. Do not add
anymore connections with dynamic sni in the private list. Thus, it is
now possible to reuse a server connection if they use the same sni.
This commit is contained in:
Amaury Denoyelle
2021-01-06 17:03:27 +01:00
parent 293dcc400e
commit 9b626e3c19
3 changed files with 27 additions and 15 deletions

View File

@@ -33,6 +33,7 @@
#include <import/xxhash.h>
#include <haproxy/api-t.h>
#include <haproxy/buf-t.h>
#include <haproxy/listener-t.h>
#include <haproxy/obj_type-t.h>
#include <haproxy/port_range-t.h>
@@ -471,8 +472,7 @@ struct conn_stream {
* CAUTION! Always update CONN_HASH_PARAMS_TYPE_COUNT when adding a new entry.
*/
enum conn_hash_params_t {
/* to remove as soon as one useful parameter is present */
CONN_HASH_DUMMY_PARAM,
CONN_HASH_PARAMS_TYPE_SNI = 0x1,
};
#define CONN_HASH_PARAMS_TYPE_COUNT 1
@@ -488,6 +488,7 @@ enum conn_hash_params_t {
*/
struct conn_hash_params {
struct server *srv;
XXH64_hash_t *sni_prehash;
};
/* This structure describes a connection with its methods and data.