summaryrefslogtreecommitdiffstats
path: root/source/n/netkit-ftp/patches/14-netkit-ftp-0.17-multiipv6.patch
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2016-06-30 20:26:57 +0000
committer Eric Hameleers <alien@slackware.com>2018-05-31 23:31:18 +0200
commitd31c50870d0bee042ce660e445c9294a59a3a65b (patch)
tree6bfc0de3c95267b401b620c2c67859557dc60f97 /source/n/netkit-ftp/patches/14-netkit-ftp-0.17-multiipv6.patch
parent76fc4757ac91ac7947a01fb7b53dddf9a78a01d1 (diff)
downloadcurrent-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.gz
current-d31c50870d0bee042ce660e445c9294a59a3a65b.tar.xz
Slackware 14.2slackware-14.2
Thu Jun 30 20:26:57 UTC 2016 Slackware 14.2 x86_64 stable is released! The long development cycle (the Linux community has lately been living in "interesting times", as they say) is finally behind us, and we're proud to announce the release of Slackware 14.2. The new release brings many updates and modern tools, has switched from udev to eudev (no systemd), and adds well over a hundred new packages to the system. Thanks to the team, the upstream developers, the dedicated Slackware community, and everyone else who pitched in to help make this release a reality. The ISOs are off to be replicated, a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. Please consider supporting the Slackware project by picking up a copy from store.slackware.com. We're taking pre-orders now, and offer a discount if you sign up for a subscription. Have fun! :-)
Diffstat (limited to 'source/n/netkit-ftp/patches/14-netkit-ftp-0.17-multiipv6.patch')
-rw-r--r--source/n/netkit-ftp/patches/14-netkit-ftp-0.17-multiipv6.patch66
1 files changed, 66 insertions, 0 deletions
diff --git a/source/n/netkit-ftp/patches/14-netkit-ftp-0.17-multiipv6.patch b/source/n/netkit-ftp/patches/14-netkit-ftp-0.17-multiipv6.patch
new file mode 100644
index 000000000..ee93e32b9
--- /dev/null
+++ b/source/n/netkit-ftp/patches/14-netkit-ftp-0.17-multiipv6.patch
@@ -0,0 +1,66 @@
+--- netkit-ftp-0.17/ftp/ftp.c.multiipv6 2006-08-02 15:03:26.000000000 +0200
++++ netkit-ftp-0.17/ftp/ftp.c 2006-08-02 15:06:19.000000000 +0200
+@@ -78,9 +78,7 @@
+ #include <netinet/in.h>
+ #include <netinet/ip.h>
+ #include <arpa/ftp.h>
+-#include <arpa/inet.h>
+ #include <arpa/telnet.h>
+-
+ #include <stdio.h>
+ #include <signal.h>
+ #include <string.h>
+@@ -132,7 +130,7 @@
+ static sigjmp_buf ptabort;
+ static int ptabflg = 0;
+ static int abrtflag = 0;
+-struct sockaddr_in source;
++struct sockaddr_storage source;
+
+ void lostpeer(int);
+ extern int connected;
+@@ -154,8 +152,8 @@
+ char *
+ hookup(const char *host, const char *port)
+ {
+- int s, tos, error, alen;
+- socklen_t len;
++ int s, tos, error;
++ socklen_t len, alen;
+ static char hostnamebuf[256];
+ struct addrinfo hints, *res, *res0;
+ char hbuf[MAXHOSTNAMELEN], pbuf[NI_MAXSERV];
+@@ -281,7 +279,15 @@
+ printf("Connected to %s (%s).\n", hostname, hbuf);
+ alen = sizeof(source);
+ getsockname(s,(struct sockaddr*)&source, &alen);
+- source.sin_port = 0; /* We just want the addr, not the port */
++ switch (source.ss_family) {
++ /* We just want the addr, not the port */
++ case AF_INET:
++ ((struct sockaddr_in *) &source)->sin_port = 0;
++ break;
++ case AF_INET6:
++ ((struct sockaddr_in6 *) &source)->sin6_port = 0;
++ break;
++ }
+
+ if (getreply(0) > 2) { /* read startup message from server */
+ if (cin)
+@@ -1260,11 +1266,11 @@
+ return(1);
+ }
+ if((multihome) &&
+- bind(data, (struct sockaddr*)&source, sizeof(source)) == -1) {
+- close(data);
+- data = -1;
+- perror("ftp multihome bind");
+- return(1);
++ bind(data, (struct sockaddr *)&source, sizeof(source)) == -1) {
++ close(data);
++ data = -1;
++ perror("ftp multihome bind");
++ return(1);
+ }
+ if (options & SO_DEBUG &&
+ setsockopt(data, SOL_SOCKET, SO_DEBUG, (char *)&on,