aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins/socket_default/socket_default_socket.c
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2016-06-14 20:41:43 +0200
committerTobias Brunner <tobias@strongswan.org>2016-06-16 14:36:15 +0200
commit63acd803f08e75f5838e8327d366e792267a6275 (patch)
tree600a96020ccb96de2f37d66aed6ea43e37ab006a /src/libcharon/plugins/socket_default/socket_default_socket.c
parenteb25b1a73d320532974dfd80411773673ea90820 (diff)
downloadstrongswan-63acd803f08e75f5838e8327d366e792267a6275.tar.bz2
strongswan-63acd803f08e75f5838e8327d366e792267a6275.tar.xz
testing: Wait for packets to be processed by tcpdump
Sometimes tcpdump fails to process all packets during the short running time of a scenario: 0 packets captured 18 packets received by filter 0 packets dropped by kernel So 18 packets were captured by libpcap but tcpdump did not yet process and print them. This tries to use --immediate-mode if supported by tcpdump (the one currently in jessie or wheezy does not, but the one in jessie-backports does), which disables the buffering in libpcap. However, even with immediate mode there are cases where it takes a while longer for all packets to get processed. And without it we also need a workaround (even though the version in wheezy actually works fine). That's why there now is a loop checking for differences in captured vs. received packets. There are actually cases where these numbers are not equal but we still captured all packets we're interested in, so we abort after 1s of retrying. But sometimes it could still happen that packets we expected got lost somewhere ("packets dropped by kernel" is not always 0 either).
Diffstat (limited to 'src/libcharon/plugins/socket_default/socket_default_socket.c')
0 files changed, 0 insertions, 0 deletions