TCP_LISTEN state oddity??

Jesse Off (joff@10thsphere.ml.org)
Thu, 22 Jan 1998 23:49:02 -0600 (CST)


I'm a newbie to the linux kernel and have chosen for my first project a
lil' hack that try's to catch strobes. In one the strobe programs,
'nmap', in particular, it probes the system by sending packets with FIN
set. The kernel seems to respond by sending a reset to requests for ports
that aren't being listened to and simply drops the packet if the port is
being listened to. Seemed kinda funny to me.

As I said, I'm a newbie, and if this has some functionality I am not aware
of, please tell :). I included a patch that seems to fix it on my system,
but am unaware if this breaks anything (hasn't yet on my system).

Cheers,
Jesse Off

--- tcp.backup Thu Jan 22 23:04:01 1998
+++ tcp_input.c.orig Thu Jan 22 23:11:32 1998
@@ -2420,7 +2420,6 @@
}
}
#endif
-tcp_send_reset(daddr,saddr,th,sk->prot,opt,dev,0, 255);
}

/*
@@ -2441,8 +2440,7 @@
if(th->rst || !th->syn || th->ack ||
ip_chk_addr(daddr)!=IS_MYADDR)
#endif
{
- kfree_skb(skb, FREE_READ);
- return 0;
+ goto no_tcp_socket;
}

/*