summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2023-03-10 09:22:43 +0100
committerDaniel Stenberg <daniel@haxx.se>2023-03-10 23:30:34 +0100
commitcb49e67303dbafbab1cebf4086e3ec15b7d56ee5 (patch)
tree7dfbfe3dd920e735f81261e2a1a60c96ade87160 /lib
parentb725fe1944b45406676ea3aff333ae3085a848d9 (diff)
downloadcurl-cb49e67303dbafbab1cebf4086e3ec15b7d56ee5.tar.gz
url: only reuse connections with same GSS delegation
Reported-by: Harry Sintonen Closes #10731
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c6
-rw-r--r--lib/urldata.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/lib/url.c b/lib/url.c
index df6ef1213..cc2f427dc 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -1279,6 +1279,11 @@ ConnectionExists(struct Curl_easy *data,
}
}
+ /* GSS delegation differences do not actually affect every connection
+ and auth method, but this check takes precaution before efficiency */
+ if(needle->gssapi_delegation != check->gssapi_delegation)
+ continue;
+
/* If multiplexing isn't enabled on the h2 connection and h1 is
explicitly requested, handle it: */
if((needle->handler->protocol & PROTO_FAMILY_HTTP) &&
@@ -1573,6 +1578,7 @@ static struct connectdata *allocate_conn(struct Curl_easy *data)
conn->fclosesocket = data->set.fclosesocket;
conn->closesocket_client = data->set.closesocket_client;
conn->lastused = Curl_now(); /* used now */
+ conn->gssapi_delegation = data->set.gssapi_delegation;
return conn;
error:
diff --git a/lib/urldata.h b/lib/urldata.h
index bf5daaf50..da5de5ba9 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -1061,6 +1061,7 @@ struct connectdata {
unsigned char ip_version; /* copied from the Curl_easy at creation time */
unsigned char httpversion; /* the HTTP version*10 reported by the server */
unsigned char connect_only;
+ unsigned char gssapi_delegation; /* inherited from set.gssapi_delegation */
};
/* The end of connectdata. */