summaryrefslogtreecommitdiff
path: root/packet.c
diff options
context:
space:
mode:
Diffstat (limited to 'packet.c')
-rw-r--r--packet.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/packet.c b/packet.c
index 3208383e8..827ae16b3 100644
--- a/packet.c
+++ b/packet.c
@@ -992,9 +992,16 @@ packet_read_poll1(void)
992 * (C)1998 CORE-SDI, Buenos Aires Argentina 992 * (C)1998 CORE-SDI, Buenos Aires Argentina
993 * Ariel Futoransky(futo@core-sdi.com) 993 * Ariel Futoransky(futo@core-sdi.com)
994 */ 994 */
995 if (!receive_context.plaintext && 995 if (!receive_context.plaintext) {
996 detect_attack(buffer_ptr(&input), padded_len, NULL) == DEATTACK_DETECTED) 996 switch (detect_attack(buffer_ptr(&input), padded_len, NULL)) {
997 packet_disconnect("crc32 compensation attack: network attack detected"); 997 case DEATTACK_DETECTED:
998 packet_disconnect("crc32 compensation attack: "
999 "network attack detected");
1000 case DEATTACK_DOS_DETECTED:
1001 packet_disconnect("deattack denial of "
1002 "service detected");
1003 }
1004 }
998 1005
999 /* Decrypt data to incoming_packet. */ 1006 /* Decrypt data to incoming_packet. */
1000 buffer_clear(&incoming_packet); 1007 buffer_clear(&incoming_packet);