From e02bd88349cfecc360dc4e554dea47597ae955ab Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Wed, 8 Jul 2020 22:10:08 +0200 Subject: [PATCH] infra: fix proto_level conditions --- kernel/mars_server.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kernel/mars_server.c b/kernel/mars_server.c index e1e0f135..f662c1f4 100644 --- a/kernel/mars_server.c +++ b/kernel/mars_server.c @@ -520,6 +520,13 @@ int handler_thread(void *data) up(&dent_limit_sem); + /* Looks strange, but is needed for not triggering + * a masked bug in old MARS versions during mixed + * updates. + */ + if (sock->s_common_proto_level >= 2) + old_proto_level = sock->s_common_proto_level; + down(&brick->socket_sem); status = mars_send_dent_list(sock, &handler_global->dent_anchor); up(&brick->socket_sem);