[dns-operations] Open source release of the DNS-STATS Compactor
Jerry Lundström
jerry at dns-oarc.net
Fri Jun 23 07:27:07 UTC 2017
On 06/22/17 17:49, Jim Hague wrote:
> Anyway, I did a bit of digging. And, thanks largely to the magic of
> strace (ploughing through your 3000+ line single source file library
> wasn't going to help much), I've found the difference between the two
> programs that causes my test to drop ping packets and yours not.
I must say, excellent analysis and write up! Kudos!
> For the select() timeout, you happen to (usually) use the same timeout
> given to pcap_set_timeout(). I set an arbitary 2s timeout for the
> select. Result: I drop, you don't.
>
> If, on the other hand, I set the select() timeout to 1ms and also set a
> pcap timeout of 1ms, I behave like your program. And if I change the
> timeout on your select to 2s and specify a pcap timeout of 1ms, you drop
> just like me.
>
> It also turns out that if we leave the select() timeout at 2s, and set
> the pcap timeout to 2s as well, dropping doesn't (seem to) happen.
Well, what a nice side effect, it wasn't anything I read or thought
about. It was more that when I developed pcap-thread I already had a
timeout value so I just reused it for the select().
Cheers,
Jerry
More information about the dns-operations
mailing list