Date: Wed, 24 Mar 1999 16:20:56 -0600
From: Taral <taral@CYBERJUNKIE.COM>
To: BUGTRAQ@netspace.org
Subject: Linux 2.2.3 patch to prevent FIN/NULL/XMAS scans
Parts/Attachments:
   1 Shown    ~9 lines  Text
   2   OK    ~11 lines  Text
----------------------------------------

This small patch prevents Linux machines from responding differently to a
stealth scan for listening sockets. Very useful for those who would like to run
a secure shop. A printk() put in front of the changed line will allow logging
of unusual packets.

Enjoy!

Taral
    [ Part 2, Text/PLAIN (Name: "tcp_input.c.patch")  11 lines. ]

--- linux/net/ipv4/tcp_input.c.orig     Tue Mar 23 16:10:22 1999
+++ linux/net/ipv4/tcp_input.c  Tue Mar 23 16:41:34 1999
@@ -2052,7 +2052,7 @@
                        goto discard;
                }
                
-               goto discard;
+               return 1;
                break;
 
        case TCP_SYN_SENT:

