mirror of
https://github.com/nmap/nmap.git
synced 2026-01-08 15:39:05 +00:00
Use getFlags16 for TCP flags in vectorize.
We use as features even the four reserved TCP flags (some of them are no longer reserved but declared for a particular purpose by some RFCs). getFlags only returns 8 bits, leading to garbage in the feature vector in the higher-order positions. This doesn't affect the integrity of fingerprint submissions, because they copy the packet contents directly and don't go through the getFlags accessor.
This commit is contained in:
@@ -847,7 +847,7 @@ static struct feature_node *vectorize(const FingerPrintResultsIPv6 *FPR) {
|
||||
continue;
|
||||
}
|
||||
features[idx++].value = tcp->getWindow();
|
||||
flags = tcp->getFlags();
|
||||
flags = tcp->getFlags16();
|
||||
for (mask = 0x001; mask <= 0x800; mask <<= 1)
|
||||
features[idx++].value = (flags & mask) != 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user