From 9cb01ffd500ca768ae4a7dec48beeb7e55ef74fe Mon Sep 17 00:00:00 2001 From: bert hubert Date: Mon, 22 Aug 2022 13:23:14 +0200 Subject: [PATCH] Fix issue #4 --- README.md | 8 ++++++++ teller.cc | 2 ++ 2 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 28b81ef..043a9b7 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,14 @@ sudo tcpdump -n -l dst net 192.0.2.1/32 $(for a in $(cat goog-prefixes.txt); do And then cry. +## Problems +If tcpdump complains about `Warning: Kernel filter failed: Cannot allocate memory`, try +this first: + +``` +sudo sysctl net.core.optmem_max=204800 +``` + ## Data source The list of Google services IP addresses can be found on [this Google support page](https://support.google.com/a/answer/10026322?hl=en). diff --git a/teller.cc b/teller.cc index aa580c7..7dc4439 100644 --- a/teller.cc +++ b/teller.cc @@ -36,6 +36,8 @@ int main() data.push_back(val); } ourcounter++; + if(counter - ourcounter > 1000) + ourcounter = counter; } else { for(int n=0; n < 150; ++n) {