49 lines
1.7 KiB
Diff
49 lines
1.7 KiB
Diff
commit 9a013ffafbd609a5b47c635fb54be6ee54bcb6c8
|
|
Author: Daniel Stenberg <daniel@haxx.se>
|
|
Date: Mon Apr 25 16:24:33 2022 +0200
|
|
|
|
[Backport] connect: store "conn_remote_port" in the info struct
|
|
|
|
Offering: RTOS
|
|
CVE: CVE-2022-27774
|
|
Reference: upstream_commit_id=08b8ef4e726ba10f45081ecda5b3cea788d3c839
|
|
|
|
DTS/AR: DTS2022042805098
|
|
type: LTS
|
|
reason: fix CVE-2022-27774 for curl.
|
|
weblink:https://github.com/curl/curl/commit/08b8ef4e726ba10f45081ecda5b3cea788d3c839
|
|
|
|
To make it available after the connection ended.
|
|
|
|
Signed-off-by: lvshengyuan <lvshengyuan1@h-partners.com>
|
|
|
|
diff --git a/lib/connect.c b/lib/connect.c
|
|
index 11e6b888b..7e9045920 100644
|
|
--- a/lib/connect.c
|
|
+++ b/lib/connect.c
|
|
@@ -619,6 +619,7 @@ void Curl_persistconninfo(struct Curl_easy *data, struct connectdata *conn,
|
|
data->info.conn_scheme = conn->handler->scheme;
|
|
data->info.conn_protocol = conn->handler->protocol;
|
|
data->info.conn_primary_port = conn->port;
|
|
+ data->info.conn_remote_port = conn->remote_port;
|
|
data->info.conn_local_port = local_port;
|
|
}
|
|
|
|
diff --git a/lib/urldata.h b/lib/urldata.h
|
|
index ffbe56993..a4e905413 100644
|
|
--- a/lib/urldata.h
|
|
+++ b/lib/urldata.h
|
|
@@ -1155,7 +1155,11 @@ struct PureInfo {
|
|
reused, in the connection cache. */
|
|
|
|
char conn_primary_ip[MAX_IPADR_LEN];
|
|
- int conn_primary_port;
|
|
+ int conn_primary_port; /* this is the destination port to the connection,
|
|
+ which might have been a proxy */
|
|
+ int conn_remote_port; /* this is the "remote port", which is the port
|
|
+ number of the used URL, independent of proxy or
|
|
+ not */
|
|
char conn_local_ip[MAX_IPADR_LEN];
|
|
int conn_local_port;
|
|
const char *conn_scheme;
|