summaryrefslogtreecommitdiffstats
path: root/ftp/mirror/files/patch-af
diff options
context:
space:
mode:
Diffstat (limited to 'ftp/mirror/files/patch-af')
-rw-r--r--ftp/mirror/files/patch-af58
1 files changed, 58 insertions, 0 deletions
diff --git a/ftp/mirror/files/patch-af b/ftp/mirror/files/patch-af
new file mode 100644
index 0000000..ab7f5db
--- /dev/null
+++ b/ftp/mirror/files/patch-af
@@ -0,0 +1,58 @@
+*** lchat.pl.orig Wed Jun 7 22:19:22 1995
+--- lchat.pl Tue Nov 25 09:20:20 1997
+***************
+*** 123,129 ****
+ # Similar to open_port, but does less. Used for PASV code with ftp.pl
+ # -Erez Zadok.
+ sub open_newport { ## public
+! local($server, $port, $newsock) = @_;
+
+ local($serveraddr,$serverproc);
+
+--- 123,129 ----
+ # Similar to open_port, but does less. Used for PASV code with ftp.pl
+ # -Erez Zadok.
+ sub open_newport { ## public
+! local($server, $port, *newsock) = @_;
+
+ local($serveraddr,$serverproc);
+
+***************
+*** 142,159 ****
+ }
+ $serverproc = pack($sockaddr, 2, $port, $serveraddr);
+
+! unless (connect($newsock, $serverproc)) {
+! ($!) = ($!, close($newsock)); # close newsock while saving $!
+ return undef;
+ }
+ # We opened with the local address set to ANY, at this stage we know
+ # which interface we are using. This is critical if our machine is
+ # multi-homed, with IP forwarding off, so fix-up.
+ local($fam,$lport);
+! ($fam,$lport,$thisaddr) = unpack($sockaddr, getsockname($newsock));
+ $thisproc = pack($sockaddr, 2, 0, $thisaddr);
+ # end of post-connect fixup
+! select((select($newsock), $| = 1)[0]);
+ return 1;
+ }
+ ##############################################################################
+--- 142,159 ----
+ }
+ $serverproc = pack($sockaddr, 2, $port, $serveraddr);
+
+! unless (connect(newsock, $serverproc)) {
+! ($!) = ($!, close(newsock)); # close newsock while saving $!
+ return undef;
+ }
+ # We opened with the local address set to ANY, at this stage we know
+ # which interface we are using. This is critical if our machine is
+ # multi-homed, with IP forwarding off, so fix-up.
+ local($fam,$lport);
+! ($fam,$lport,$thisaddr) = unpack($sockaddr, getsockname(newsock));
+ $thisproc = pack($sockaddr, 2, 0, $thisaddr);
+ # end of post-connect fixup
+! select((select(newsock), $| = 1)[0]);
+ return 1;
+ }
+ ##############################################################################
OpenPOWER on IntegriCloud