[conntrack-tools] network: remove message omission test-code

Pablo Neira netfilter-cvslog-bounces at lists.netfilter.org
Sun Nov 2 18:41:20 CET 2008


Gitweb:		http://git.netfilter.org/cgi-bin/gitweb.cgi?p=conntrack-tools.git;a=commit;h=43694a92f5521537109f14ec5fb9c8f4b2a821f6
commit 43694a92f5521537109f14ec5fb9c8f4b2a821f6
Author:     Pablo Neira Ayuso <pablo at netfilter.org>
AuthorDate: Sun Nov 2 18:40:11 2008 +0100
Commit:     Pablo Neira Ayuso <pablo at netfilter.org>
CommitDate: Sun Nov 2 18:40:11 2008 +0100

    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 at netfilter.org>
       via  43694a92f5521537109f14ec5fb9c8f4b2a821f6 (commit)
      from  e78d828aff1ba35dfdb2e4ccede22cb887977086 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 43694a92f5521537109f14ec5fb9c8f4b2a821f6
Author: Pablo Neira Ayuso <pablo at netfilter.org>
Date:   Sun Nov 2 18:40:11 2008 +0100

    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 at netfilter.org>

-----------------------------------------------------------------------

 src/network.c |   13 -------------
 1 files changed, 0 insertions(+), 13 deletions(-)
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 at netfilter.org>

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));



More information about the netfilter-cvslog mailing list