Use sideband also for "proceed" handshake.
[paraslash.git] / command.c
index 5e13df6..8deb69c 100644 (file)
--- a/command.c
+++ b/command.c
@@ -975,7 +975,10 @@ __noreturn void handle_connect(int fd, const char *peername)
        /* init stream cipher keys with the second part of the random buffer */
        cc->scc.recv = sc_new(rand_buf + CHALLENGE_SIZE, SESSION_KEY_LEN);
        cc->scc.send = sc_new(rand_buf + CHALLENGE_SIZE + SESSION_KEY_LEN, SESSION_KEY_LEN);
-       ret = sc_send_buffer(&cc->scc, PROCEED_MSG);
+       if (cc->use_sideband)
+               ret = send_sb(&cc->scc, NULL, 0, SBD_PROCEED, false);
+       else
+               ret = sc_send_buffer(&cc->scc, PROCEED_MSG);
        if (ret < 0)
                goto net_err;
        ret = read_command(&cc->scc, &command);