summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2020-03-13 04:01:56 +0000
committerDamien Miller <djm@mindrot.org>2020-03-14 19:39:30 +1100
commit5becbec023f2037394987f85ed7f74b9a28699e0 (patch)
treeea7a8e45ac5e4a71d95f5b99e376b51fa3f823ef /sshd.c
parenteef88418f9e5e51910af3c5b23b5606ebc17af55 (diff)
upstream: use sshpkt_fatal() for kex_exchange_identification()
errors. This ensures that the logged errors are consistent with other transport- layer errors and that the relevant IP addresses are logged. bz3129 ok dtucker@ OpenBSD-Commit-ID: 2c22891f0b9e1a6cd46771cedbb26ac96ec2e6ab
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sshd.c b/sshd.c
index e59077911..6f8f11a3b 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.551 2020/03/13 03:24:49 dtucker Exp $ */ 1/* $OpenBSD: sshd.c,v 1.552 2020/03/13 04:01:57 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2155,8 +2155,9 @@ main(int ac, char **av)
2155 if (!debug_flag) 2155 if (!debug_flag)
2156 alarm(options.login_grace_time); 2156 alarm(options.login_grace_time);
2157 2157
2158 if (kex_exchange_identification(ssh, -1, options.version_addendum) != 0) 2158 if ((r = kex_exchange_identification(ssh, -1,
2159 cleanup_exit(255); /* error already logged */ 2159 options.version_addendum)) != 0)
2160 sshpkt_fatal(ssh, r, "banner exchange");
2160 2161
2161 ssh_packet_set_nonblocking(ssh); 2162 ssh_packet_set_nonblocking(ssh);
2162 2163