]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
director: Fix USER-KICK and USER-KICK-ALT forwarding
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 15 Dec 2016 17:03:39 +0000 (19:03 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 15 Dec 2016 17:03:39 +0000 (19:03 +0200)
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

src/director/director.c

index 3e0920e932f3adfed25d34557980055609999e8f..810a4545e494eb586fa240ecd9861892c06d36b4 100644 (file)
@@ -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);