summaryrefslogtreecommitdiffstats
path: root/src/sync-ftfw.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2008-12-08 11:10:47 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2008-12-08 11:10:47 +0100
commita516e5f8e550a6073aae96491372c45ce340da88 (patch)
treee87a074749efdad9365a83678d74f076a6a95171 /src/sync-ftfw.c
parent1c7352133af433d3d3881bb21e1de0e9e32f5b8c (diff)
network: remove the netpld header from the messages
This patch simplifies the message format of the replication messages. As a result, we save four bytes. The netpld header was introduced in the early protocol design. Today, it does not have any reason to exist. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/sync-ftfw.c')
-rw-r--r--src/sync-ftfw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sync-ftfw.c b/src/sync-ftfw.c
index 293f9ab..a4895d4 100644
--- a/src/sync-ftfw.c
+++ b/src/sync-ftfw.c
@@ -451,10 +451,9 @@ out:
static void ftfw_send(struct nethdr *net, struct us_conntrack *u)
{
- struct netpld *pld = NETHDR_DATA(net);
struct cache_ftfw *cn;
- switch(ntohs(pld->query)) {
+ switch(net->type) {
case NFCT_Q_CREATE:
case NFCT_Q_UPDATE:
case NFCT_Q_DESTROY:
@@ -490,7 +489,9 @@ static void ftfw_send(struct nethdr *net, struct us_conntrack *u)
static int tx_queue_xmit(void *data1, const void *data2)
{
struct nethdr *net = data1;
- size_t len = prepare_send_netmsg(STATE_SYNC(mcast_client), net);
+
+ nethdr_set_ack(net);
+ HDR_HOST2NETWORK(net);
dp("tx_queue sq: %u fl:%u len:%u\n",
ntohl(net->seq), net->flags, ntohs(net->len));
@@ -510,7 +511,6 @@ static int tx_list_xmit(struct list_head *i, struct us_conntrack *u, int type)
{
int ret;
struct nethdr *net = BUILD_NETMSG(u->ct, type);
- size_t len = prepare_send_netmsg(STATE_SYNC(mcast_client), net);
dp("tx_list sq: %u fl:%u len:%u\n",
ntohl(net->seq), net->flags, ntohs(net->len));