Your message dated Tue, 08 Feb 2022 15:04:27 +0000 with message-id <[email protected]> and subject line Bug#685910: fixed in gftp 2.9.0~beta-1 has caused the Debian Bug report #685910, regarding Connecting using IPv6 using passive mode, data connection is not established to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 685910: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685910 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message --------BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Package: gftp Version: 2.0.19-2 Severity: important When connecting to a IPv6 FTP server, any data connection in passive mode is not possible. Even the initial GET_CWD is not working. Below you find the client-server chat of the FTP session. After the LIST -L instruction nothing happens. On the server you can find a new listening socket on the port in the Extended Passive Mode message waiting for the incoming connection. 220 ProFTPD Server (Debian) [2a01:xxxx:121:xxxx:0:58c6:901e:1] USER juergen 331 Password required for alex PASS xxxx 230 User alex logged in SYST 215 UNIX Type: L8 TYPE I 200 Type set to I PWD 257 "/" is the current directory Lade Verzeichnisliste / von der Gegenstelle (LC_TIME=de_DE.UTF-8) EPSV 229 Entering Extended Passive Mode (|||48620|) LIST -L This behaviour is due to incorrect handling of the different Address Families when creating new sockets for the data connections. The attached patch fixes the issue and dataconnections are as well possible for IPv6 FTP sessions. The patch has to be appied using the command `patch -p2 < /path/to/gftp-ipv6-dataconn.patch` in diretory "gftp-2.0.19/lib". I'm using Debian Debian 6.0.5, Kernel 3.2.0-0.bpo.2-amd64 and libc6 2.11.3-3 Following you find the patch fixing the issue: - --- gftp-2.0.19/lib/rfc959.c 2008-03-04 13:02:48.000000000 +0100 +++ gftp-workingcopy/lib/rfc959.c 2012-08-26 11:18:10.000000000 +0200 @@ -935,7 +935,7 @@ return (GFTP_EFATAL); } - - memcpy (&data_addr, request->remote_addr, request->remote_addr_len); + memcpy (&data_addr.sin6_addr, request->remote_addr, request->remote_addr_len); data_addr.sin6_port = htons (port); if (connect (parms->data_connection, (struct sockaddr *) &data_addr, - --- gftp-2.0.19/lib/socket-connect-getaddrinfo.c 2008-03-28 00:29:26.000000000 +0100 +++ gftp-workingcopy/lib/socket-connect-getaddrinfo.c 2012-08-26 11:29:21.000000000 +0200 @@ -26,6 +26,7 @@ get_port (struct addrinfo *addr) { struct sockaddr_in * saddr; + struct sockaddr_in6 * saddr6; int port; if (addr->ai_family == AF_INET) @@ -33,6 +34,11 @@ saddr = (struct sockaddr_in *) addr->ai_addr; port = ntohs (saddr->sin_port); } + else if (addr->ai_family == AF_INET6) + { + saddr6 = (struct sockaddr_in6*) addr->ai_addr; + port = ntohs(saddr6->sin6_port); + } else port = 0; @@ -145,8 +151,15 @@ request->remote_addr_len = current_hostp->ai_addrlen; request->remote_addr = g_malloc0 (request->remote_addr_len); - - memcpy (request->remote_addr, &((struct sockaddr_in *) current_hostp->ai_addr)->sin_addr, - - request->remote_addr_len); + + if (current_hostp->ai_family == AF_INET) { + memcpy (request->remote_addr, &((struct sockaddr_in *) current_hostp->ai_addr)->sin_addr, + request->remote_addr_len); + } + else if (current_hostp->ai_family == AF_INET6) { + memcpy (request->remote_addr, &((struct sockaddr_in6 *) current_hostp->ai_addr)->sin6_addr, + request->remote_addr_len); + } request->logging_function (gftp_logging_misc, request, _("Connected to %s:%d\n"), res[0].ai_canonname, -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlA5+i8ACgkQS4gT86VyyKogkwCgl/JEwCFwt74w2RQxU+kLUfjn L2AAnRud0/BPREk8OX2F52aTXa3g9BHH =P3/R -----END PGP SIGNATURE-------- gftp-2.0.19/lib/rfc959.c 2008-03-04 13:02:48.000000000 +0100 +++ gftp-workingcopy/lib/rfc959.c 2012-08-26 11:18:10.000000000 +0200 @@ -935,7 +935,7 @@ return (GFTP_EFATAL); } - memcpy (&data_addr, request->remote_addr, request->remote_addr_len); + memcpy (&data_addr.sin6_addr, request->remote_addr, request->remote_addr_len); data_addr.sin6_port = htons (port); if (connect (parms->data_connection, (struct sockaddr *) &data_addr, --- gftp-2.0.19/lib/socket-connect-getaddrinfo.c 2008-03-28 00:29:26.000000000 +0100 +++ gftp-workingcopy/lib/socket-connect-getaddrinfo.c 2012-08-26 11:29:21.000000000 +0200 @@ -26,6 +26,7 @@ get_port (struct addrinfo *addr) { struct sockaddr_in * saddr; + struct sockaddr_in6 * saddr6; int port; if (addr->ai_family == AF_INET) @@ -33,6 +34,11 @@ saddr = (struct sockaddr_in *) addr->ai_addr; port = ntohs (saddr->sin_port); } + else if (addr->ai_family == AF_INET6) + { + saddr6 = (struct sockaddr_in6*) addr->ai_addr; + port = ntohs(saddr6->sin6_port); + } else port = 0; @@ -145,8 +151,15 @@ request->remote_addr_len = current_hostp->ai_addrlen; request->remote_addr = g_malloc0 (request->remote_addr_len); - memcpy (request->remote_addr, &((struct sockaddr_in *) current_hostp->ai_addr)->sin_addr, - request->remote_addr_len); + + if (current_hostp->ai_family == AF_INET) { + memcpy (request->remote_addr, &((struct sockaddr_in *) current_hostp->ai_addr)->sin_addr, + request->remote_addr_len); + } + else if (current_hostp->ai_family == AF_INET6) { + memcpy (request->remote_addr, &((struct sockaddr_in6 *) current_hostp->ai_addr)->sin6_addr, + request->remote_addr_len); + } request->logging_function (gftp_logging_misc, request, _("Connected to %s:%d\n"), res[0].ai_canonname,
--- End Message ---
--- Begin Message ---Source: gftp Source-Version: 2.9.0~beta-1 Done: Andreas Rönnquist <[email protected]> We believe that the bug you reported is fixed in the latest version of gftp, which is due to be installed in the Debian FTP archive. A summary of the changes between this version and the previous one is attached. Thank you for reporting the bug, which will now be closed. If you have further comments please address them to [email protected], and the maintainer will reopen the bug report if appropriate. Debian distribution maintenance software pp. Andreas Rönnquist <[email protected]> (supplier of updated gftp package) (This message was generated automatically at their request; if you believe that there is a problem with it please contact the archive administrators by mailing [email protected]) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Format: 1.8 Date: Tue, 08 Feb 2022 14:40:14 +0100 Source: gftp Architecture: source Version: 2.9.0~beta-1 Distribution: unstable Urgency: medium Maintainer: Andreas Rönnquist <[email protected]> Changed-By: Andreas Rönnquist <[email protected]> Closes: 582354 685910 686270 Changes: gftp (2.9.0~beta-1) unstable; urgency=medium . * New upstream version 2.9.0~beta - fixes IPv6 support (Closes: #685910, #686270) * Project license is now MIT * Enable SSL again (Closes: #582354) * Handle LICENSE instead of COPYING now Checksums-Sha1: d2a4684e0ea4eac881301da85189354b6e056d74 2083 gftp_2.9.0~beta-1.dsc ffff575d5dbc8e98c5ff7472e6403fe793730832 872076 gftp_2.9.0~beta.orig.tar.xz a2da86eca88e476e3c141edf587928808213fcb6 10752 gftp_2.9.0~beta-1.debian.tar.xz 2887d8a6734143430c21efaf58f9aed325af924e 12225 gftp_2.9.0~beta-1_source.buildinfo Checksums-Sha256: 6a1a3d17b749e8cec872590fd71ad27c4277c03be39d3a94a4eeff839b5503ac 2083 gftp_2.9.0~beta-1.dsc 7f89c691609cde9a551f811c4ca1261019af1975146b00ef443dc769217ef591 872076 gftp_2.9.0~beta.orig.tar.xz 48d051cc7b9f05492e0376ac144b1cb78531008fd2cc59de63369a7f7588f4f6 10752 gftp_2.9.0~beta-1.debian.tar.xz 2daf36d023c6206c969a6e17849b39083308d2f31c83d1486d1381897e70571d 12225 gftp_2.9.0~beta-1_source.buildinfo Files: 1f0eda24432dbf0cd8f1fe9efd26c78e 2083 net optional gftp_2.9.0~beta-1.dsc 587d280cf940460b67b4fb3d4d6feff1 872076 net optional gftp_2.9.0~beta.orig.tar.xz dde91262478da9c514a9dcbf60287f1e 10752 net optional gftp_2.9.0~beta-1.debian.tar.xz 21792e6bff07ccd376af0e5f0b7af7c6 12225 net optional gftp_2.9.0~beta-1_source.buildinfo -----BEGIN PGP SIGNATURE----- iQJFBAEBCAAvFiEE2zBuSxD/2Y7021XXGUtjGrLaKIgFAmICgHMRHGd1c25hbkBn dXNuYW4uc2UACgkQGUtjGrLaKIh6Kw//TfSi7NQCnnJZ703ofPzbHlKj3vzwderm YgnrADJ3FMNIkSNk7SIzpK8OzYNugn/ZAFPwnJm/tesb+dbOMJBrhSwDtguLUc51 WKcgS3+egoC31lFKeCxb27JlZwMdK9g0jAJpiRrrPCY/woFw/DNTPHIAGKZgtR5/ VnYzNcdiAiv9fHUzcce/j8KQko8IeGz9tdXcgKT3xV/CbbIePudKm2PrG2lpBJRG JTXPBqWRUMPJv2sKBAZ4p0xEsi8kf0i03XO7MrYJyt25wafOUPo5WizX6iWF4kD7 PyMhMHDYIxRBfsKxJoeoLFrU0CQRXpJwYTn0gu/F956G3wJt3eCIQvR/hEz971QG 6hswSgnRWZA5VJlBpNviCIzXcb6dgmHglZjSuvYvVK96YjTRNn+k5Zm7YKt3CGdu VhmhH9IQlJQQB0EywGRKvbt6sg+/q8yYDtLwEGYPiCJFwGDAk5E05MVuFACfuVJ0 mAwkNCw9bgQEHEATvumg3eyPTKPLiUYH3o+fSVRLzXXbM9lUsriCDitiPkcx2y3V pL6GjKY634HsTpd67XySZy8N4whaTzbGVnItXeLp08BGH0VeBYgt69eqIunXgE4k Ugki5JJ5JYBIgTGrtZiSy+YFtB5vcMZItu27eA/nWlGYxtQsloNk8mODrwax/84Q aDqOaYWzzu8= =txXD -----END PGP SIGNATURE-----
--- End Message ---

