Bug 717412

Summary: Connection failures during upload using PORT not handled cleanly
Product: [Fedora] Fedora Reporter: Siddhesh Poyarekar <spoyarek>
Component: vsftpdAssignee: Jiri Skala <jskala>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: aglotov, jskala, mnewsome, nagy.martin
Target Milestone: ---Keywords: EasyFix, Patch, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-28 19:50:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Siddhesh Poyarekar 2011-06-28 19:00:18 UTC
Created attachment 510344 [details]
Set retval -1 and correct errno on connect failure

Description of problem:
vsftpd does not handle connection failures using the PORT command when a client tries to upload a file to it, but has ftp-data port blocked due to some reason.

Version-Release number of selected component (if applicable):
vsftpd-2.2.2-6.el6_0.1

How reproducible:
Always

Steps to Reproduce:
1. At client:

iptables -A INPUT -p tcp --sport ftp-data -j REJECT --reject-with icmp-net-unreachable

2. Connect to the ftp server
3. Upload file
  
Actual results:

Transfer hangs at:

local: ftptest remote: ftptest
200 PORT command successful. Consider using PASV.
150 Ok to send data.


Expected results:

The client should get an error:

local: ftptest remote: ftptest
200 PORT command successful. Consider using PASV.
425 Failed to establish connection.

Additional info:

Attached patch by Takayuki Nagata <tnagata> fixes this.

Comment 1 Siddhesh Poyarekar 2011-06-28 19:01:31 UTC
Component is of course vsftpd-2.3.4-1.f16