diff options
Diffstat (limited to 'packet.c')
-rw-r--r-- | packet.c | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: packet.c,v 1.143 2006/08/05 08:34:04 dtucker Exp $ */ | 1 | /* $OpenBSD: packet.c,v 1.144 2006/09/16 19:53:37 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 |
@@ -1000,9 +1000,16 @@ packet_read_poll1(void) | |||
1000 | * (C)1998 CORE-SDI, Buenos Aires Argentina | 1000 | * (C)1998 CORE-SDI, Buenos Aires Argentina |
1001 | * Ariel Futoransky(futo@core-sdi.com) | 1001 | * Ariel Futoransky(futo@core-sdi.com) |
1002 | */ | 1002 | */ |
1003 | if (!receive_context.plaintext && | 1003 | if (!receive_context.plaintext) { |
1004 | detect_attack(buffer_ptr(&input), padded_len) == DEATTACK_DETECTED) | 1004 | switch (detect_attack(buffer_ptr(&input), padded_len)) { |
1005 | packet_disconnect("crc32 compensation attack: network attack detected"); | 1005 | case DEATTACK_DETECTED: |
1006 | packet_disconnect("crc32 compensation attack: " | ||
1007 | "network attack detected"); | ||
1008 | case DEATTACK_DOS_DETECTED: | ||
1009 | packet_disconnect("deattack denial of " | ||
1010 | "service detected"); | ||
1011 | } | ||
1012 | } | ||
1006 | 1013 | ||
1007 | /* Decrypt data to incoming_packet. */ | 1014 | /* Decrypt data to incoming_packet. */ |
1008 | buffer_clear(&incoming_packet); | 1015 | buffer_clear(&incoming_packet); |