Projects
home:Eustace:branches:Eulaceura:Factory
gvfs
_service:obs_scm:backport-ftp-Fix-data-connecti...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:backport-ftp-Fix-data-connection-to-IPv6-link-local-address.patch of Package gvfs
From 60972c11189d7657eb3414a7763915bea8bb4a02 Mon Sep 17 00:00:00 2001 From: Ben Wolsieffer <benwolsieffer@gmail.com> 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
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2