From 4445d9c5aa0d0b5d53355e8e371ecb91f3c6f60f Mon Sep 17 00:00:00 2001 From: "W.C.A. Wijngaards" Date: Mon, 23 Nov 2020 09:44:56 +0100 Subject: [PATCH] stream reuse, fix review comments. --- services/outside_network.h | 7 +++++-- testdata/tls_reuse.tdir/tls_reuse.conf | 2 +- testdata/tls_reuse.tdir/tls_reuse.test | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/services/outside_network.h b/services/outside_network.h index 5ca074183..15b33094f 100644 --- a/services/outside_network.h +++ b/services/outside_network.h @@ -233,8 +233,11 @@ struct port_comm { struct reuse_tcp { /** rbtree node with links in tcp_reuse tree. key is NULL when not * in tree. Both active and empty connections are in the tree. - * key is this structure, the sockaddr and and then is-ssl bool, - * and then ptr value for several times same address in tree */ + * key is a pointer to this structure, the members used to compare + * are the sockaddr and and then is-ssl bool, and then ptr value is + * used in case the same address exists several times in the tree + * when there are multiple connections to the same destination to + * make the rbtree items unique. */ rbnode_type node; /** the key for the tcp_reuse tree. address of peer, ip4 or ip6, * and port number of peer */ diff --git a/testdata/tls_reuse.tdir/tls_reuse.conf b/testdata/tls_reuse.tdir/tls_reuse.conf index 52857ca37..e8200b28b 100644 --- a/testdata/tls_reuse.tdir/tls_reuse.conf +++ b/testdata/tls_reuse.tdir/tls_reuse.conf @@ -11,7 +11,7 @@ server: do-not-query-localhost: no tls-cert-bundle: "unbound_server.pem" - ssl-upstream: yes + tls-upstream: yes forward-zone: name: "." diff --git a/testdata/tls_reuse.tdir/tls_reuse.test b/testdata/tls_reuse.tdir/tls_reuse.test index fe488cbb2..0f392fba8 100644 --- a/testdata/tls_reuse.tdir/tls_reuse.test +++ b/testdata/tls_reuse.tdir/tls_reuse.test @@ -190,7 +190,7 @@ for x in a1.more.net a2.more.net a3.more.net a4.more.net a5.more.net; do done # make the server timeout to drop the upstream connection -echo "> sleep 20" +echo "> sleep 15" sleep 15 # see if we are still up. echo "> query a7.more.net" -- 2.47.3