Skip Menu |

This queue is for tickets about the libnet CPAN distribution.

Report information
The Basics
Id: 89105
Status: new
Priority: 0/
Queue: libnet

Owner: Nobody in particular
Requestors: Rimantas.Cernauskas [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

CC: #CBG dev <#CBGdev [...]>
Subject: Net::FTP unable to set local port for "active" mode connections
Date: Tue, 1 Oct 2013 14:00:16 +0100
To: "bug-libnet [...]" <bug-libnet [...]>
From: Rimantas Cernauskas <Rimantas.Cernauskas [...]>
Download (untitled) / with headers
text/plain 986b
Net::FTP 2.77 Perl v5.16.3 Linux 2.6.18-348.12.1.el5 Our application is behind the firewall and one of our providers insisted on having "active" FTP connection for files upload. Due to security reasons, operations requested to use static port for incoming data connection from FTP server, which is usually supported by sending PORT command to FTP server, however Net::FTP is not creating socket if you issue $ftp->port("xxx,xxx,xxx,xxx,aa,bb") command. I've modified Net::FTP to allow this functionallity ( ) This change introduces method set_local_port($IntPortNumber). It's also being called by constructor if LocalPort is specified, so it can be used by wrappers like Net::FTP::AutoReconnect. Bear in mind, that value for set_local_port is decimal port number to be used by IO::Socket. Reuse option will be automatically set for IO::Socket constructor. Any comments or suggestions are very welcome. Thanks, Rimantas Cernauskas

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to