Index: Makefile.in --- Makefile.in.orig 2009-12-13 02:22:43 +0100 +++ Makefile.in 2010-01-05 11:58:10 +0100 @@ -13,6 +13,7 @@ CPPFLAGS=@CPPFLAGS@ EXEEXT=@EXEEXT@ LDFLAGS=@LDFLAGS@ +PERL=perl INSTALLCMD=@INSTALL@ INSTALLMAN=@INSTALL@ @@ -175,7 +176,7 @@ @if test -f proto.h; then :; else cp -p $(srcdir)/proto.h .; fi proto.h-tstamp: $(srcdir)/*.c $(srcdir)/lib/compat.c config.h - perl $(srcdir)/mkproto.pl $(srcdir)/*.c $(srcdir)/lib/compat.c + $(PERL) $(srcdir)/mkproto.pl $(srcdir)/*.c $(srcdir)/lib/compat.c man: rsync.1 rsyncd.conf.5 @if test -f rsync.1; then :; else cp -p $(srcdir)/rsync.1 .; fi Index: compat.c --- compat.c.orig 2009-12-21 23:40:41 +0100 +++ compat.c 2010-01-05 11:49:22 +0100 @@ -166,19 +166,21 @@ rprintf(FINFO, "(%s) Protocol versions: remote=%d, negotiated=%d\n", am_server? "Server" : "Client", remote_protocol, protocol_version); } - if (remote_protocol < MIN_PROTOCOL_VERSION - || remote_protocol > MAX_PROTOCOL_VERSION) { + if ( ( am_server && (remote_protocol < MIN_CLIENT_PROTOCOL_VERSION || remote_protocol > MAX_CLIENT_PROTOCOL_VERSION)) + || (!am_server && (remote_protocol < MIN_SERVER_PROTOCOL_VERSION || remote_protocol > MAX_SERVER_PROTOCOL_VERSION))) { rprintf(FERROR,"protocol version mismatch -- is your shell clean?\n"); rprintf(FERROR,"(see the rsync man page for an explanation)\n"); exit_cleanup(RERR_PROTOCOL); } - if (remote_protocol < OLD_PROTOCOL_VERSION) { - rprintf(FINFO,"%s is very old version of rsync, upgrade recommended.\n", - am_server? "Client" : "Server"); + if ( ( am_server && remote_protocol < OLD_CLIENT_PROTOCOL_VERSION) + || (!am_server && remote_protocol < OLD_SERVER_PROTOCOL_VERSION)) { + rprintf(FINFO,"%s is very old version (protocol %d) of rsync, upgrade recommended.\n", + am_server? "Client" : "Server", remote_protocol); } - if (protocol_version < MIN_PROTOCOL_VERSION) { + if ( ( am_server && protocol_version < MIN_SERVER_PROTOCOL_VERSION) + || (!am_server && protocol_version < MIN_CLIENT_PROTOCOL_VERSION)) { rprintf(FERROR, "--protocol must be at least %d on the %s.\n", - MIN_PROTOCOL_VERSION, am_server? "Server" : "Client"); + am_server ? MIN_SERVER_PROTOCOL_VERSION : MIN_CLIENT_PROTOCOL_VERSION, am_server? "Server" : "Client"); exit_cleanup(RERR_PROTOCOL); } if (protocol_version > PROTOCOL_VERSION) { Index: rsync.h --- rsync.h.orig 2009-12-23 20:36:27 +0100 +++ rsync.h 2010-01-05 11:49:22 +0100 @@ -115,9 +115,12 @@ * unlikely to begin by sending a byte between MIN_PROTOCL_VERSION and * MAX_PROTOCOL_VERSION. */ -#define MIN_PROTOCOL_VERSION 20 -#define OLD_PROTOCOL_VERSION 25 -#define MAX_PROTOCOL_VERSION 40 +#define MIN_SERVER_PROTOCOL_VERSION 20 +#define OLD_SERVER_PROTOCOL_VERSION 25 +#define MAX_SERVER_PROTOCOL_VERSION 40 +#define MIN_CLIENT_PROTOCOL_VERSION 25 +#define OLD_CLIENT_PROTOCOL_VERSION 27 +#define MAX_CLIENT_PROTOCOL_VERSION 40 #define FILECNT_LOOKAHEAD 1000