recv SYN after FIN or RST is considered to be TCP port reuse
This commit is contained in:
@@ -658,7 +658,8 @@ static struct session *session_manager_lookup_tcp_session(struct session_manager
|
||||
|
||||
enum flow_direction dir = identify_direction_by_history(sess, key);
|
||||
struct tcp_half *half = &sess->tcp_halfs[dir];
|
||||
if (half->isn && half->isn != tcp_hdr_get_seq(hdr))
|
||||
if ((half->isn && half->isn != tcp_hdr_get_seq(hdr)) || // recv SYN with different ISN
|
||||
((half->history & TH_FIN) || (half->history & TH_RST))) // recv SYN after FIN or RST
|
||||
{
|
||||
// TCP port reuse, evict old session
|
||||
session_manager_evicte_session(mgr, sess, now, PORT_REUSE_EVICT);
|
||||
|
||||
Reference in New Issue
Block a user