From: Timo Sirainen Date: Thu, 15 Dec 2016 17:03:39 +0000 (+0200) Subject: director: Fix USER-KICK and USER-KICK-ALT forwarding X-Git-Tag: 2.3.0.rc1~2419 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6460420c3843322b3e725d83288a098cbd0edee2;p=thirdparty%2Fdovecot%2Fcore.git director: Fix USER-KICK and USER-KICK-ALT forwarding The internal IPC command was prefixed, which caused the remote director to reject the commands and disconnect: director(...): Command proxy: Unknown command proxy director(...): Remote sent invalid protocol data recently, waiting 57 secs before allowing further communication --- diff --git a/src/director/director.c b/src/director/director.c index 3e0920e932..810a4545e4 100644 --- a/src/director/director.c +++ b/src/director/director.c @@ -1099,6 +1099,7 @@ void director_kick_user(struct director *dir, struct director_host *src, orig_src = dir->self_host; orig_src->last_seq++; } + str_truncate(cmd, 0); str_printfa(cmd, "USER-KICK\t%s\t%u\t%u\t", net_ip2addr(&orig_src->ip), orig_src->port, orig_src->last_seq); str_append_tabescaped(cmd, username); @@ -1123,6 +1124,7 @@ void director_kick_user_alt(struct director *dir, struct director_host *src, orig_src = dir->self_host; orig_src->last_seq++; } + str_truncate(cmd, 0); str_printfa(cmd, "USER-KICK-ALT\t%s\t%u\t%u\t", net_ip2addr(&orig_src->ip), orig_src->port, orig_src->last_seq); str_append_tabescaped(cmd, field);