commit PR 154469, ftp-proxy(8) bug ?

Alexander V. Chernikov melifaro at ipfw.ru
Thu Jun 23 05:48:03 UTC 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Kurt Jaeger wrote:
> Hi!
> 
>>> Can someone have a look at
>>>
>>> http://www.freebsd.org/cgi/query-pr.cgi?pr=154469
>>>
>>> and commit it ? So that it ends up in 8.3 8-} ?
>> Does the patch from OpenBSD fix the problem for you?
> 
> Yes, sure. That why I sent the pr!
> 

Yep, the patch does the right thing:

Setup:

FTP server: 87.51.34.132 (ftp.freebsd.org)
FTP client: 10.11.0.8 (stock freebsd ftp client)

GW with pf & ftp-proxy (FreeBSD 7.3)
ext: em0 77.73.232.13
int: vlan3 10.11.0.1

FTP session:

23:50 [0] bibi# ftp -a 87.51.34.132
Connected to 87.51.34.132.
220 ftp.beastie.tdk.net FTP server (Version 6.00LS) ready.
331 Guest login ok, send your email address as password.
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> quit

TCPDUMP (10.11.0.8 em0):
(-lnpAs0 host 87.51.34.132)

23:51:39.487136 IP 10.11.0.8.47376 > 87.51.34.132.21: Flags [P.], ack
303, win 8326, options [nop,nop,TS val 458938281 ecr 1611018784], length 6
E..:b. at .@.TW
...W3".......E....... ........
.Z..`.2 QUIT

23:51:39.530414 IP 87.51.34.132.21 > 10.11.0.8.47376: Flags [F.], seq
303, ack 56, win 4163, options [nop,nop,TS val 1611020954 ecr
458938281], length 0
E..4.. at .@...W3".
.............E....CT......
`.:..Z..


Note 'server' silently closing connection

TCPDUMP (GW em0):
23:56:20.405425 IP 77.73.232.13.61168 > 87.51.34.132.21: P 50:56(6) ack
303 win 4163 <nop,nop,timestamp 2027802761 1933653527>
W3".........dn.....C.......
x...sA6.QUIT

23:56:20.448332 IP 87.51.34.132.21 > 77.73.232.13.61168: . ack 56 win
257 <nop,nop,timestamp 1933655700 2027802761>
....dn...........&.....
sA>.x...
23:56:20.448345 IP 87.51.34.132.21 > 77.73.232.13.61168: P 303:317(14)
ack 56 win 257 <nop,nop,timestamp 1933655700 2027802761>
....dn...........8.....
sA>.x...221 Goodbye.

23:56:20.448353 IP 87.51.34.132.21 > 77.73.232.13.61168: F 317:317(0)
ack 56 win 257 <nop,nop,timestamp 1933655700 2027802761>
....dn.&...............
sA>.x...

Note real server transmits '221 Goodbye'



After applying patch:

23:54 [0] bibi# ftp -a 87.51.34.132
Connected to 87.51.34.132.
220 ftp.beastie.tdk.net FTP server (Version 6.00LS) ready.
331 Guest login ok, send your email address as password.
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> quit
221 Goodbye.

Note '221 Goodvye' received by ftp client
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4CzWYACgkQwcJ4iSZ1q2lOcwCfYqknB9i1P7bfjgYVpSjkSWP1
Y8wAn3hC2pZ/OHDicCN+o3v1O5YiFZ8W
=dqk/
-----END PGP SIGNATURE-----


More information about the freebsd-stable mailing list