diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-11-02 18:40:11 +0100 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2008-11-02 18:40:11 +0100 |
commit | 43694a92f5521537109f14ec5fb9c8f4b2a821f6 (patch) | |
tree | a7acbffb1d53fd4ae1da6281fe53ad6e0d6502ac /src/network.c | |
parent | e78d828aff1ba35dfdb2e4ccede22cb887977086 (diff) | |
download | conntrack-tools-43694a92f5521537109f14ec5fb9c8f4b2a821f6.tar.gz conntrack-tools-43694a92f5521537109f14ec5fb9c8f4b2a821f6.zip |
network: remove message omission test-code
This patch removes a part of the code that can be used to
simulate message loss in the replication. This was useful to test the
FT-FW code. However, this code is not useful anymore as long as we
have netem: tc qdisc add dev eth0 root netem loss 0.1%
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/network.c')
-rw-r--r-- | src/network.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/network.c b/src/network.c index fb6ea90..7d1d9fa 100644 --- a/src/network.c +++ b/src/network.c @@ -31,19 +31,6 @@ static size_t __do_send(struct mcast_sock *m, void *data, size_t len) { struct nethdr *net = data; -#undef _TEST_DROP -#ifdef _TEST_DROP - -#define DROP_RATE .25 - - /* simulate message omission with a certain probability */ - if ((random() & 0x7FFFFFFF) < 0x80000000 * DROP_RATE) { - printf("drop sq: %u fl:%u len:%u\n", - ntohl(net->seq), ntohs(net->flags), - ntohs(net->len)); - return 0; - } -#endif debug("send sq: %u fl:%u len:%u\n", ntohl(net->seq), ntohs(net->flags), ntohs(net->len)); |