Index: Makefile.in --- Makefile.in.orig 2015-12-19 01:09:58.000000000 +0100 +++ Makefile.in 2015-12-22 12:11:34.638953414 +0100 @@ -23,6 +23,7 @@ MKDIR_P=@MKDIR_P@ VPATH=$(srcdir) SHELL=/bin/sh +PERL=perl VERSION=@RSYNC_VERSION@ @@ -210,7 +211,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 man-copy Index: compat.c --- compat.c.orig 2015-08-08 21:47:03.000000000 +0200 +++ compat.c 2015-12-22 11:55:03.058905880 +0100 @@ -171,19 +171,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 2015-08-08 21:47:03.000000000 +0200 +++ rsync.h 2015-12-22 11:55:03.058905880 +0100 @@ -122,9 +122,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 MIN_FILECNT_LOOKAHEAD 1000 #define MAX_FILECNT_LOOKAHEAD 10000