hgn / captcp

A open source program for TCP analysis of PCAP files
http://research.protocollabs.com/captcp/
GNU General Public License v3.0
113 stars 40 forks source link

fixed TcpConn uid hashing #48

Closed usama54321 closed 6 years ago

usama54321 commented 6 years ago

The uid hashing for TcpConn class is not unique. For example, it makes the same uid for the the following two ip pairs (10.1.2.1:14000, 10.1.3.2:14000) and (10.1.4.1:14000, 10.1.5.2:14000). This was resulting in the script crashing.

I assumed that the hash function needed to be commutative, as it was originally, thus the extra if. It could have been done in a better way, but this should work

hgn commented 6 years ago

Thank you very much Usama - merged!