mirror of
https://github.com/ivre/masscanned.git
synced 2025-10-01 22:28:20 +00:00
Fix syn (#102)
* Add unit test for TCP SYN replies * Add functional test for TCP SYN+flag packets * Fix bug: prevent anwsers to SYN+flag first packets * Fix TCP behaviour to match Linux network stack * Update the documentation according to the new behaviour for TCP SYN packets
This commit is contained in:
parent
092a16631c
commit
c132c39ebf
3 changed files with 128 additions and 3 deletions
|
@ -217,7 +217,11 @@ code `0` and the same payload as the incoming packet, as specified by [RFC 792](
|
|||
a supported protocol (Layer 5/6/7) has been detected,
|
||||
* if the received packet has flag `ACK`, it is ignored,
|
||||
* if the received packet has flag `RST` or `FIN-ACK`, it is ignored,
|
||||
* if the received packet has flag `SYN`, then `masscanned` answers with a `SYN-ACK` packet, setting a **SYNACK-cookie** in the sequence number.
|
||||
* if the received packet has flag `SYN`, then `masscanned` tries to imitate the behaviour
|
||||
of a standard Linux stack - which is:
|
||||
* if there are additional flags that are not among `PSH`, `URG`, `CWR`, `ECE`, then the `SYN` is ignored,
|
||||
* if the flags `CWR` and`ECE` are simultaneously set, then the `SYN` is ignored,
|
||||
* in any other case, `masscanned` answers with a `SYN-ACK` packet, setting a **SYNACK-cookie** in the sequence number.
|
||||
|
||||
#### UDP
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue