Experimental Physics and
| |||||||||||||||||
|
Dale L. Brewe wrote: I'm having a bit of an issue trying to get tornado 2.02 to boot from a RAID network storage appliance (ReadyNAS from Infrant) running ProFTPD v.1.2.9 under a version of Linux. The problem is that downloading the boot image takes around 6-7 minutes. Downloading the script file happens normally, in a couple of seconds. This sounds like a known issue with the vxWorks bootrom code, which closes its sockets in the wrong order. We came across this first with the Solaris 9 FTP server, which derives from a different codebase than the previous Solaris FTP servers and is less liberal in what it will accept. There are two TCP sockets involved with an FTP file transfer, the command socket and the data socket. The vxWorks FTP library allows application code rather a lot of control over the data transfer process since it wants to allow the data socket to be connected directly to some code (such as the ld command) that can perform I/O directly on the socket without having to buffer all the data coming through it. This means that the library isn't able to completely enforce the protocol by itself, and an application can cause problems. An FTP client is supposed to close the data socket when it's finished reading the data, and then close the command socket. Unfortunately the vxWorks bootrom code does that in the wrong order, and thus doesn't correctly follow the FTP protocol defined in RFC959. Older FTP servers don't seem to mind this, but some newer servers will not look for a new command on the command socket until the data socket has been closed (this may be for security reasons). The fix involves applying this patch (which applies to all BSPs) to your target/config/all/bootConfig.c file, then rebuilding and flashing the bootrom. - Andrew
while ((read (fd, command, sizeof (command))) > 0); + close (fd); if (bootFtp) (void) ftpCommand (errFd, "QUIT",0,0,0,0,0,0); } - close (fd); close (errFd); return (OK); @@ -2510,5 +2510,6 @@ while ((read (fd, command, sizeof (command))) > 0); + close (fd); if (bootFtp) { @@ -2520,6 +2521,7 @@ { char buf [100]; int errBytesRecv = fioRead (errFd, buf, sizeof (buf)); + close (fd); if (errBytesRecv > 0) { @@ -2530,7 +2532,6 @@ } } - close (fd); close (errFd); return (ERROR);
| ||||||||||||||||
ANJ, 02 Sep 2010 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing · |