Re: aftpd bug?
Ahmon Dancy <[email protected]> Mon, 01 Nov 2004 10:03:37 -0800
| Newsgroups | gmane.lisp.open-source.franz |
|---|---|
| Message-ID | <29262.1099332217@dancy> |
Kuroda, Thanks for the information. This problem is being investigated. Even with your suggestion, there could still be port collisions. cmd-pasv has a check to see it make-socket fails due to an address-in-use error but for some reason it is not being caught. Where you using the binary distribution or did you build it yourself? If the latter, what version of Allegro CL did you use? >> Bug in aftpd? >> >> Phenomenon: >> In passive mode, aftpd send same port number to client. >> In a situation described below, you can't get files from aftpd. >> 1. login aftpd using ftp client and passive mode on. >> 2. get any file and quick logout. >> 3. re-login aftpd again quickly and get any file. >> 4. result in failuer. >> >> From aftpd log in /var/log/ftp. >> Mon Nov 01 14:43:52 2004 [11216]: Error: creating a passive socket NIL resulted in error (code 48): Address already in use. >> >> The cause of bug: >> After client makes connection to server in function stand-alone(), >> aftpd calls function spawn-client, so that every sub-process has same >> random seed. >> As you know, in passive mode aftpd send port number generated by >> function random() to client, and the port number is always same. >> >> Solution: >> In function cmd-pasv(), give (make-random-state t) as function >> random()'s random-state argument to generate new random seed every >> time it is called. >>