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

when I do a small change (hardcoded, just for test) in Net/INET6Glue/FTP.pm:
$ diff /usr/local/sisis-pap/perl5.16.2/lib/site_perl/5.16.2/Net/INET6G +lue/FTP.pm* 30c30 < LocalAddr => $ftp->sockhost, --- > LocalAddr => 'fe80::250:56ff:feb6:5310%eth0'
the transfer of the data works:
Net::FTP=GLOB(0x83b0080)<<< 150 Here comes the directory listing. Net::FTP=GLOB(0x83b0080)<<< 226 Directory send OK. file: file file: tr Net::FTP=GLOB(0x83b0080)>>> EPRT |2|fe80::250:56ff:feb6:5310|35672| Net::FTP=GLOB(0x83b0080)<<< 200 EPRT command successful. Consider usin +g EPSV. Net::FTP=GLOB(0x83b0080)>>> RETR file Net::FTP=GLOB(0x83b0080)<<< 150 Opening BINARY mode data connection fo +r file (12 bytes). Net::FTP=GLOB(0x83b0080)<<< 226 File send OK. Net::FTP=GLOB(0x83b0080)>>> QUIT Net::FTP=GLOB(0x83b0080)<<< 221 Goodbye.
this underpins that somehow on the way down the %eth0 is droped off the $ftp->sockhost;

Replies are listed 'Best First'.
Re^4: Net::ftp && IPv6
by Loops (Curate) on Nov 11, 2014 at 14:19 UTC

    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.

      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