diff -aruN netfilter-ha.heile/linux-2.6/ct_sync/ct_sync.h netfilter-ha.working_and_cleaned/linux-2.6/ct_sync/ct_sync.h --- netfilter-ha.heile/linux-2.6/ct_sync/ct_sync.h 2006-03-24 20:59:56.736073247 +0100 +++ netfilter-ha.working_and_cleaned/linux-2.6/ct_sync/ct_sync.h 2006-03-26 18:27:17.144798914 +0200 @@ -127,7 +127,6 @@ enum ct_sync_resource_t { CT_SYNC_RES_CONNTRACK = 0x01, - CT_SYNC_RES_EXPECT = 0x02, }; enum ct_sync_upd_flag_t diff -aruN netfilter-ha.heile/linux-2.6/ct_sync/ct_sync_main.c netfilter-ha.working_and_cleaned/linux-2.6/ct_sync/ct_sync_main.c --- netfilter-ha.heile/linux-2.6/ct_sync/ct_sync_main.c 2006-03-24 20:59:56.740073493 +0100 +++ netfilter-ha.working_and_cleaned/linux-2.6/ct_sync/ct_sync_main.c 2006-03-26 18:27:55.607099496 +0200 @@ -106,48 +106,6 @@ * FILLING CTSYNC MESSAGES WITH DATA ***********************************************************************/ -#if 0 -static int -fill_expectmsg(void *buff, __u8 event, - struct ip_conntrack *master, - struct ip_conntrack_expect *expect) -{ - struct ct_sync_msghdr *hdr = buff; - struct ct_sync_expect *sexp = buff + sizeof(*hdr); - - CT_SYNC_ENTER(); - - /* fill event header */ - hdr->type = event; - hdr->resource = CT_SYNC_RES_EXPECT; - hdr->len = __constant_htons(sizeof(*sexp)); - - /* copy data from expectation */ - memcpy(&sexp->tuple, &expect->tuple, sizeof(sexp->tuple)); - memcpy(&sexp->mask, &expect->mask, sizeof(sexp->mask)); - sexp->seq = expect->seq; - memcpy(&sexp->proto, &expect->proto, sizeof(sexp->proto)); - sexp->help = expect->help; - if (expect->expectant) - memcpy(&sexp->expectant, - &master->tuplehash[IP_CT_DIR_ORIGINAL].tuple, - sizeof(sexp->expectant)); - else - memset(&sexp->expectant, 0, sizeof(sexp->expectant)); - - if (expect->sibling) - memcpy(&sexp->sibling, - &expect->sibling->tuplehash[IP_CT_DIR_ORIGINAL].tuple, - sizeof(sexp->sibling)); - else - memset(&sexp->sibling, 0, sizeof(sexp->sibling)); - - CT_SYNC_LEAVE(); - - return 0; -} -#endif - static int fill_ctmsg(void *buff, __u8 event, struct ip_conntrack *ct, __u8 flags) { @@ -581,59 +539,6 @@ return 0; } -static int -ct_sync_msg_process_updateexpect(void *data, u16 len) -{ - struct ct_sync_expect *exp = (struct ct_sync_expect *)data; - - CT_SYNC_ENTER(); - - if (unlikely(len < sizeof(struct ct_sync_expect))) { - CTS_STAT_INC(rx.error); - CT_SYNC_ERR("Illegal message size: %u\n", len); - CT_SYNC_LEAVE(); - return -1; - } - - CT_SYNC_LEAVE(); - - return 0; -} - -static int -ct_sync_msg_process_delexpect(void *data, u16 len) -{ - struct ct_sync_expect *sexp = (struct ct_sync_expect *)data; - struct ip_conntrack_expect *exp; - - CT_SYNC_ENTER(); - - if (unlikely(len < sizeof(struct ct_sync_expect))) { - CTS_STAT_INC(rx.error); - CT_SYNC_ERR("Illegal message size: %u\n", len); - CT_SYNC_LEAVE(); - return -1; - } -#if 0 - READ_LOCK(&ip_conntrack_lock); - WRITE_LOCK(&ip_conntrack_expect_tuple_lock); - exp = LIST_FIND(&ip_conntrack_expect_list, expect_cmp, - struct ip_conntrack_expect *, exp->tuple); - if (!exp || !exp->expectant) - goto unlock_out; - - if (conntrack_tuple_cmp(&exp->expectant, - &exp->expectant->tuplehash[IP_CT_DIR_ORIGINAL].tuple)) - __unexpect_related(exp); - -unlock_out: - WRITE_INLOCK(&ip_conntrack_expect_tuple_lock); - READ_UNLOCK(&ip_donntrack_lock); -#endif - CT_SYNC_LEAVE(); - return 0; -} - /* process incoming message in slave mode */ static int ct_sync_msg_process_slave(struct ct_sync_msghdr *msghdr, @@ -665,18 +570,6 @@ break; } break; - case CT_SYNC_RES_EXPECT: - switch(msghdr->type) { - case CT_SYNC_MSG_UPDATE: - CTS_STAT_INC(rx.exp_upd_tot); - ret = ct_sync_msg_process_updateexpect(data, len); - break; - case CT_SYNC_MSG_DELETE: - CTS_STAT_INC(rx.exp_del_tot); - ret = ct_sync_msg_process_delexpect(data, len); - break; - } - break; default: CT_SYNC_DEBUG("Invalid resource while being SLAVE: %d.\n", msghdr->resource); @@ -1345,66 +1238,6 @@ CT_SYNC_LEAVE(); } -#if 0 -/* conntrack expectation created notification */ -static void -ct_sync_expect_create(struct ip_conntrack_expect *exp) -{ - struct cts_buff *csb; - struct ip_conntrack *master_ct = exp->expectant; - - CT_SYNC_ENTER(); - - if (likely(cts_proto_is_master(cts_cfg.protoh) && - is_confirmed(master_ct))) { - void *buff; - - buff = cts_proto_want_enqueue(cts_cfg.protoh, &csb, - CTMSG_SIZEOF(struct ct_sync_expect)); - if (unlikely(!buff)) { - CT_SYNC_ERR("unable to enqueue event\n"); - CT_SYNC_LEAVE(); - return; - } - fill_expectmsg(buff, CT_SYNC_MSG_UPDATE, master_ct, exp); - csb_use_dec(cts_cfg.protoh, csb); - } - - CT_SYNC_LEAVE(); - - return; -} - -/* conntrack expectation destroyed notification */ -static void -ct_sync_expect_destroy(struct ip_conntrack_expect *exp) -{ - struct cts_buff *csb; - struct ip_conntrack *master_ct = exp->expectant; - - CT_SYNC_ENTER(); - - if (likely(cts_proto_is_master(cts_cfg.protoh) && - is_confirmed(master_ct))) { - void *buff; - - buff = cts_proto_want_enqueue(cts_cfg.protoh, &csb, - CTMSG_SIZEOF(struct ct_sync_expect)); - if (unlikely(!buff)) { - CT_SYNC_ERR("unable to enqueue event\n"); - CT_SYNC_LEAVE(); - return; - } - // FIXME: implementation - csb_use_dec(cts_cfg.protoh, csb); - } - - CT_SYNC_LEAVE(); - - return; -} -#endif - static int ct_sync_notify(struct notifier_block *this, unsigned long events, void *conntrack) @@ -1680,12 +1513,6 @@ * MODULE INITIALIZATION ***********************************************************************/ -static int -kill_all(const struct ip_conntrack *i, void *data) -{ - return 1; -} - static struct task_struct *rcv_thread, *send_thread, *initsync_thread; /* DO NOT declare this as __init!! */