From d44413588dd70fe7e6b08a97dde6456b45db9280 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 12 Mar 2020 22:08:16 +0100 Subject: [PATCH] Assume sideband and aes_ctr128 are always supported/requested. Sideband connections and the AES-based stream cipher have become mandatory in paraslash-0.6. The server no longer needs to annouce the feature as 0.6.x clients request it, regardless of whether it was announced or not. It needs to still accept the option, though. On the client side, we don't need to request the features any more as the server just ignores the request. --- client_common.c | 3 +-- command.c | 7 ++++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/client_common.c b/client_common.c index c25da96b..16568b9c 100644 --- a/client_common.c +++ b/client_common.c @@ -292,8 +292,7 @@ static int client_post_select(struct sched *s, void *context) case CL_RECEIVED_WELCOME: /* send auth command */ if (!FD_ISSET(ct->scc.fd, &s->wfds)) return 0; - sprintf(buf, AUTH_REQUEST_MSG "%s sideband,aes_ctr128", - ct->user); + sprintf(buf, AUTH_REQUEST_MSG "%s", ct->user); PARA_INFO_LOG("--> %s\n", buf); ret = write_buffer(ct->scc.fd, buf); if (ret < 0) diff --git a/command.c b/command.c index 0a76f68e..f4eeb524 100644 --- a/command.c +++ b/command.c @@ -787,6 +787,11 @@ static int parse_auth_request(char *buf, int len, const struct user **u, *p = '\0'; p++; create_argv(p, ",", &features); + /* + * Still accept sideband and AES feature requests (as a no-op) + * because some 0.6.x clients request them. The two checks + * below may be removed after 0.7.1. + */ for (i = 0; features[i]; i++) { if (strcmp(features[i], "sideband") == 0) continue; @@ -905,7 +910,7 @@ int handle_connect(int fd) /* send Welcome message */ ret = write_va_buffer(fd, "This is para_server, version " PACKAGE_VERSION ".\n" - "Features: sideband,aes_ctr128\n" + "Features:\n" ); if (ret < 0) goto net_err; -- 2.39.5