http://qs321.pair.com?node_id=1106818


in reply to Re^3: Net::ftp && IPv6
in thread Net::ftp && IPv6

Strange. It all just works here in passive mode, and the non-passive case is explainable. When I add the following print to your code, i get the %eth0:

my $ftp = Net::FTP->new($ipaddr, Debug=>1, Passive=>1) or die "Can't c +onnect: $@\n"; print $ftp->sockhost;

I'm guessing by this point it's already missing for you? Using Net::FTP 3.02 and IO::Socket::INET is 1.35 here.

As a digression, my ifconfig shows a scope id of "2" for my eth0 device. When I then use %2 at the end of the ip address, Net::FTP automatically replaces it with %eth0. While that's new to me, it's obviously supported. However Net::FTP violates RFC 2428 by including that in the EPRT command in the non-passive case. I had to do rule rewriting in my Proftpd server to strip it off before things would work.

Replies are listed 'Best First'.
Re^5: Net::ftp && IPv6
by gurucubano (Initiate) on Nov 12, 2014 at 12:43 UTC
    After updating libnet to version 3.02 and IO-Socket-IP to 0.32 it works as it should, $ftp->sockhost returns the IP addr with the %eth0 at the end and FTP works fine; Thread end, thanks