rpms/ftp/devel netkit-ftp-0.17-multiipv6.patch, NONE, 1.1 ftp.spec, 1.28, 1.29
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Aug 2 13:21:56 UTC 2006
- Previous message (by thread): rpms/sed/devel sed-4.1.5-str_append.patch, NONE, 1.1 sed.spec, 1.35, 1.36
- Next message (by thread): rpms/gnome-screensaver/FC-5 .cvsignore, 1.18, 1.19 gnome-screensaver.spec, 1.69, 1.70 sources, 1.21, 1.22
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: mmaslano
Update of /cvs/dist/rpms/ftp/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv18822
Modified Files:
ftp.spec
Added Files:
netkit-ftp-0.17-multiipv6.patch
Log Message:
--- 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
netkit-ftp-0.17-multiipv6.patch:
ftp.c | 28 +++++++++++++++++-----------
1 files changed, 17 insertions(+), 11 deletions(-)
--- NEW FILE netkit-ftp-0.17-multiipv6.patch ---
--- 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,
Index: ftp.spec
===================================================================
RCS file: /cvs/dist/rpms/ftp/devel/ftp.spec,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- ftp.spec 26 Jul 2006 12:56:27 -0000 1.28
+++ ftp.spec 2 Aug 2006 13:21:51 -0000 1.29
@@ -1,7 +1,7 @@
Summary: The standard UNIX FTP (File Transfer Protocol) client.
Name: ftp
Version: 0.17
-Release: 32.1.2.2
+Release: 32.1.2.4
License: BSD
Group: Applications/Internet
Source0: ftp://ftp.uk.linux.org/pub/linux/Networking/netkit-devel/netkit-ftp-%{version}.tar.bz2
@@ -19,6 +19,7 @@
Patch12: netkit-ftp-0.17-data.patch
Patch13: netkit-ftp-0.17-multihome.patch
Patch14: netkit-ftp-0.17-longnames.patch
+Patch15: netkit-ftp-0.17-multiipv6.patch
BuildRoot: /var/tmp/%{name}-root
BuildRequires: gcc, glibc-devel, readline-devel, ncurses-devel, perl
@@ -46,7 +47,8 @@
%patch11 -p1 -b .C-Frame121
%patch12 -p1 -b .data
%patch13 -p1 -b .multihome
-%patch14 -p1 -b .longnames
+%patch14 -p1 -b .patch
+%patch15 -p1 -b .multiipv6
%build
sh configure --with-c-compiler=gcc --enable-ipv6
@@ -80,7 +82,10 @@
%{_mandir}/man5/netrc.*
%changelog
-* Thu Jul 25 2006 Marcela Maslanova <mmaslano at redhat.com> - 0.17-32.1.2.2
+* Wed Aug 2 2006 Marcela Maslanova <mmaslano at redhat.com> - 0.17-32.1.2.4
+- fix (#199145) patch for IPv6 multihome
+
+* Thu Jul 25 2006 Marcela Maslanova <mmaslano at redhat.com> - 0.17-32.1.2.3
- fix (#196103) patch for long filenames
* Wed Jul 12 2006 Jesse Keating <jkeating at redhat.com> - 0.17-32.1.2.1
- Previous message (by thread): rpms/sed/devel sed-4.1.5-str_append.patch, NONE, 1.1 sed.spec, 1.35, 1.36
- Next message (by thread): rpms/gnome-screensaver/FC-5 .cvsignore, 1.18, 1.19 gnome-screensaver.spec, 1.69, 1.70 sources, 1.21, 1.22
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list