tcprstat
tcprstat copied to clipboard
fix: RT calculation not correct under certain circumstances
As we can see, it will capture all the packets match with 'port' as bellow, if (port) sprintf(filter, "tcp port %d", port); pcap_compile(pcap, &bpf, filter, 1, 0)
but it doesn't distinguish the src port and dst port. If this 'server' works as 'client' and connect other server with this port, it will generate wrong RT value.
This patch is to fix this circumstance.
Hey @laoar , thank you for your code!
The patch looks correct -- I'll test it as I get a chance and proceed :)