summaryrefslogtreecommitdiff
path: root/crypto/openssh/packet.c
diff options
context:
space:
mode:
authorSimon L. B. Nielsen <simon@FreeBSD.org>2006-09-30 19:58:07 +0000
committerSimon L. B. Nielsen <simon@FreeBSD.org>2006-09-30 19:58:07 +0000
commit150f381d548b0eb6e043ece264908c702fbcba75 (patch)
tree564213cc1a73b8d7cdafb4452ac610b3da2eac9d /crypto/openssh/packet.c
parent69563d3a52a724e304ed378c595c4c76e21f976a (diff)
Notes
Diffstat (limited to 'crypto/openssh/packet.c')
-rw-r--r--crypto/openssh/packet.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/crypto/openssh/packet.c b/crypto/openssh/packet.c
index daae9ffaaa2a..bd1bceccccdd 100644
--- a/crypto/openssh/packet.c
+++ b/crypto/openssh/packet.c
@@ -940,9 +940,16 @@ packet_read_poll1(void)
* (C)1998 CORE-SDI, Buenos Aires Argentina
* Ariel Futoransky(futo@core-sdi.com)
*/
- if (!receive_context.plaintext &&
- detect_attack(buffer_ptr(&input), padded_len, NULL) == DEATTACK_DETECTED)
- packet_disconnect("crc32 compensation attack: network attack detected");
+ if (!receive_context.plaintext) {
+ switch (detect_attack(buffer_ptr(&input), padded_len, NULL)) {
+ case DEATTACK_DETECTED:
+ packet_disconnect("crc32 compensation attack: "
+ "network attack detected");
+ case DEATTACK_DOS_DETECTED:
+ packet_disconnect("deattack denial of "
+ "service detected");
+ }
+ }
/* Decrypt data to incoming_packet. */
buffer_clear(&incoming_packet);