From 1536057d4a357f28ba27407cc2294527f85b8fd4 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Sun, 30 Jul 2017 00:51:06 +0200 Subject: Fix tcp checksum computation in pcap save --- src/monitor-gui.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/monitor-gui.cc b/src/monitor-gui.cc index 0670b80..ea2132c 100644 --- a/src/monitor-gui.cc +++ b/src/monitor-gui.cc @@ -1389,7 +1389,7 @@ private: sum += (data[i * 2] << 8) | data[i * 2 + 1]; } if (size % 2) sum += data[size - 1] << 8; - return ~size; + return ~sum; } #else // HAVE_PCAP static bool is_pcap(std::string const&) { -- cgit v1.2.3-70-g09d2