diff options
author | djm@openbsd.org <djm@openbsd.org> | 2015-11-13 04:39:35 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-11-16 11:31:38 +1100 |
commit | d87063d9baf5479b6e813d47dfb694a97df6f6f5 (patch) | |
tree | b79091decb70207be9bb0dd27e8b37943e75c1d4 /kex.c | |
parent | 9fd04681a1e9b0af21e08ff82eb674cf0a499bfc (diff) |
upstream commit
send SSH2_MSG_UNIMPLEMENTED replies to unexpected
messages during KEX; bz#2949, ok dtucker@
Upstream-ID: 2b3abdff344d53c8d505f45c83a7b12e84935786
Diffstat (limited to 'kex.c')
-rw-r--r-- | kex.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kex.c,v 1.111 2015/10/13 00:21:27 djm Exp $ */ | 1 | /* $OpenBSD: kex.c,v 1.112 2015/11/13 04:39:35 djm Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -315,7 +315,14 @@ kex_prop_free(char **proposal) | |||
315 | static int | 315 | static int |
316 | kex_protocol_error(int type, u_int32_t seq, void *ctxt) | 316 | kex_protocol_error(int type, u_int32_t seq, void *ctxt) |
317 | { | 317 | { |
318 | error("Hm, kex protocol error: type %d seq %u", type, seq); | 318 | struct ssh *ssh = active_state; /* XXX */ |
319 | int r; | ||
320 | |||
321 | error("kex protocol error: type %d seq %u", type, seq); | ||
322 | if ((r = sshpkt_start(ssh, SSH2_MSG_UNIMPLEMENTED)) != 0 || | ||
323 | (r = sshpkt_put_u32(ssh, seq)) != 0 || | ||
324 | (r = sshpkt_send(ssh)) != 0) | ||
325 | return r; | ||
319 | return 0; | 326 | return 0; |
320 | } | 327 | } |
321 | 328 | ||