tcprstat icon indicating copy to clipboard operation
tcprstat copied to clipboard

fix: RT calculation not correct under certain circumstances

Open laoar opened this issue 8 years ago • 1 comments

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.

laoar avatar Jun 05 '17 13:06 laoar

Hey @laoar , thank you for your code!

The patch looks correct -- I'll test it as I get a chance and proceed :)

Lowercases avatar Jun 07 '17 03:06 Lowercases