/ Bug 2247 – wrong 'address mismatch' in core_pasv() (IPv6 problem ?)
Bug 2247 - wrong 'address mismatch' in core_pasv() (IPv6 problem ?)
: wrong 'address mismatch' in core_pasv() (IPv6 problem ?)
Status: CLOSED FIXED
Product: ProFTPD
core
: 1.2.9rc3
: PC FreeBSD
: P2 normal
Assigned To: proftpd development group
:
:
:
:
  Show dependency treegraph
 
Reported: 2003-10-21 14:15 UTC by Vladimir Kotal
Modified: 2003-10-31 11:42 UTC (History)
0 users (show)

See Also:


Attachments
this is patch to add debug messages to src/netaddr.c (955 bytes, patch)
2003-10-21 14:18 UTC, Vladimir Kotal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kotal 2003-10-21 14:15:45 UTC
1.2.9rc3 compiled on FreeBSD-4.7 RELEASE with '#define USE_IPV6 1' in config.h
produces invalid 'address mismatch' messages like this:

Oct 20 22:41:14 ftp proftpd[61474]: IP1 (IP2[IP2]) - 
Refused PORT IP2,4,139 (address mismatch) 
  
this comes from modules/mod_core.c, around line 3119.

when I added debug messages to src/netaddr.c to see what is the problem, 
I got -2 return value. see the patch for details. 

the output were then like this:

Oct 21 20:06:47 ftp proftpd[5045]: IP1 (IP4[IP4]) - A 28 (null) 2 IP4
Oct 21 20:06:47 ftp proftpd[5045]: IP1 (IP4[IP4]) - Refused PORT IP4,4,15 (-2 ad
dress mismatch)
Oct 21 20:06:48 ftp proftpd[5041]: IP1 (IP2[IP2]) - getnameinfo error: ai_family
 not supported
Oct 21 20:06:48 ftp proftpd[5041]: IP1 (IP2[IP2]) - A 28 (null) 2 IP2
Oct 21 20:06:48 ftp proftpd[5041]: IP1 (IP2[IP2]) - Refused PORT IP2,176,66 (-2
address mismatch)
Oct 21 20:06:48 ftp proftpd[5047]: IP1 - B 2 IP1|2 IP1
Oct 21 20:06:49 ftp proftpd[5047]: IP1 (IP3[IP3]) - USER sev-era.pb: Login succe
ssful.
Oct 21 20:06:50 ftp proftpd[5041]: IP1 (IP2[IP2]) - getnameinfo error: ai_family
 not supported
Oct 21 20:06:50 ftp proftpd[5041]: IP1 (IP2[IP2]) - A 28 (null) 2 IP2
Oct 21 20:06:50 ftp proftpd[5041]: IP1 (IP2[IP2]) - Refused PORT IP2,176,67 (-2
address mismatch)


the server was compiled with ./configure only
Comment 1 Vladimir Kotal 2003-10-21 14:18:09 UTC
Created attachment 1911 [details]
this is patch to add debug messages to src/netaddr.c
Comment 2 TJ Saunders 2003-10-21 16:04:10 UTC
See most recent patch attached to Bug#2204.
Comment 3 TJ Saunders 2003-10-21 16:06:08 UTC
Current CVS sources should have this issue fixed.
Comment 4 TJ Saunders 2003-10-24 13:27:07 UTC
Can you confirm that this problem is fixed in current CVS?
Comment 5 Vladimir Kotal 2003-10-26 15:14:13 UTC
seems to be working with both EPRT and EPSV with current as of today.
Comment 6 TJ Saunders 2003-10-26 20:11:50 UTC
What about PORT?
Comment 7 Vladimir Kotal 2003-10-27 08:25:31 UTC
seems to be working:

lftp ftp:/pub> get 00index.txt
---> TYPE I
<--- 200 Type set to I
---> SIZE 00index.txt 
<--- 213 360
---> MDTM 00index.txt 
<--- 213 20030530085235
---> PORT <IPaddr>,132,108
<--- 200 PORT command successful
---> RETR 00index.txt 
<--- 150 Opening BINARY mode data connection for 00index.txt
          (360 bytes)
---- Closing data socket
<--- 226 Transfer complete.
360 bytes transferred in 1 second (280b/s)
Comment 8 TJ Saunders 2003-10-31 11:42:16 UTC
Resolved in 1.2.9.  Thanks!