代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gvfs 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 60972c11189d7657eb3414a7763915bea8bb4a02 Mon Sep 17 00:00:00 2001
From: Ben Wolsieffer <[email protected]>
Date: Tue, 12 Mar 2024 21:34:43 -0400
Subject: [PATCH] ftp: Fix data connection to IPv6 link-local address
With IPv6, the passive mode data connection address is constructed by
taking the control socket address and replacing the port with the one
specified in the EPSV response. In doing so, we lose the scope-id and
flowinfo properties. The scope-id field in particular is required when
connecting to a link local address, as it determines which link the
address belongs to. Without it, the connection fails.
To fix this, manually construct the GInetSocketAddress instance, copying
all the fields except the port from the old address.
---
daemon/gvfsftptask.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/daemon/gvfsftptask.c b/daemon/gvfsftptask.c
index e44f80690..a1e457074 100644
--- a/daemon/gvfsftptask.c
+++ b/daemon/gvfsftptask.c
@@ -794,12 +794,20 @@ static GSocketAddress *
g_vfs_ftp_task_create_remote_address (GVfsFtpTask *task, guint port)
{
GSocketAddress *old, *new;
+ GInetSocketAddress *old_inet;
old = g_vfs_ftp_connection_get_address (task->conn, &task->error);
if (old == NULL)
return NULL;
g_assert (G_IS_INET_SOCKET_ADDRESS (old));
- new = g_inet_socket_address_new (g_inet_socket_address_get_address (G_INET_SOCKET_ADDRESS (old)), port);
+ old_inet = G_INET_SOCKET_ADDRESS (old);
+
+ new = g_object_new (G_TYPE_INET_SOCKET_ADDRESS,
+ "address", g_inet_socket_address_get_address (old_inet),
+ "port", port,
+ "flowinfo", g_inet_socket_address_get_flowinfo (old_inet),
+ "scope-id", g_inet_socket_address_get_scope_id (old_inet),
+ NULL);
return new;
}
--
GitLab
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。