P@SW bug in SMC Barricade

Moderator: Project members

Post Reply
Message
Author
Merlin
500 Command not understood
Posts: 3
Joined: 2005-12-29 03:55
Location: Germany

P@SW bug in SMC Barricade

#1 Post by Merlin » 2005-12-29 04:41

Sorry to open a new thread just after registering, hope you'll forgive.
(Some) SMC Barricade routers have the nice 'feature' of translating incoming PASV commands to P@SW, thus making passive-mode transfers between an ftp server inside the LAN and a client connecting from the WAN impossible [edit] causing my forum status to appear on the screen [/edit]. My problem is that some friends are sitting behind a NAT, so they can't use active mode.
The (ugly but rather simple) solution is treating P@SW commands just like PASV ones; raidenftpd does have this option but I really prefer FileZilla. I'd love to not have to reapply the fix and recompile everytime a new version of FileZilla comes out, so if someone of you would get around to add that fix/option to the next patch/nightly build that would be absolutely wonderful :)

Thanks in advance; again, hope I'm not being a d!ck here.

User avatar
botg
Site Admin
Posts: 35558
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse

#2 Post by botg » 2005-12-29 10:46

If you can point me to the official specifications of the P@SW command I can implement it. Else you'll have to update your router.

Merlin
500 Command not understood
Posts: 3
Joined: 2005-12-29 03:55
Location: Germany

#3 Post by Merlin » 2005-12-29 18:03

Unfortunately there is neither a fix for the router nor official specifications of the P@SW command, but I'm confident it is the same as PASV. This site details the problem: http://www.gbnetwork.co.uk/smcftpd/
... The intention of this feature was to make the client think that the server does not support the PASV mode and resort back to using active mode instead. In reality virtually no ftp client software will do this so all this feature accomplishes is to stop FTP server software from working even if it does have the features to support PASV from behind a firewall.
I was under the impression it's only a matter of a few lines of code/changes, like, if there's a P@SW cmd coming in, do the same as if it were PASV, instead of not recognizing it. Maybe I'm thinking too simple here, will be looking at the code now.

[edit] I think it's static const t_command commands[] in ControlSocket.cpp, adding

Code: Select all

COMMAND_PASV, "P@SW", FALSE, FALSE,
just below

Code: Select all

COMMAND_PASV, "PASV", FALSE, FALSE,
should do it, at least I hope so. Though I'm afraid I will now have to install all the stuff necessary to compile FZ on w32 to test this theory, anyway... [/edit]

Merlin
500 Command not understood
Posts: 3
Joined: 2005-12-29 03:55
Location: Germany

#4 Post by Merlin » 2006-01-07 05:03

It seems to be impossible to compile FileZilla (Server) without some kind of MSVC++ (i guess it's their tools and/or libs) or other µ$ malware, so maybe you could do a 'quick' compile with the above-stated crude fix which i could test/use? That would be really kind : )

Post Reply