path: root/src/network.c
diff options
authorPablo Neira Ayuso <>2008-11-02 21:29:04 +0100
committerPablo Neira Ayuso <>2008-11-02 21:29:04 +0100
commit64ce47955778805afceb6ced58b63839763541ad (patch)
treebf67f80a47e7d46d3d8649f4a6e8b73a9e53d599 /src/network.c
parent43694a92f5521537109f14ec5fb9c8f4b2a821f6 (diff)
network: add protocol version field (breaks backward compatibility)
This patch adds the version field (8-bits long) to the nethdr structure. This fields can be used to indicate the protocol version in case that we detect an incompatibility between two conntrackd daemons working with different protocol versions. Unfortunately, this patch breaks backward compatibility, ie. conntrackd <= 0.9.8 protocol is not compatible with the upcoming conntrackd >= 0.9.9. Better do this now than later. Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'src/network.c')
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network.c b/src/network.c
index 7d1d9fa..04c9d39 100644
--- a/src/network.c
+++ b/src/network.c
@@ -32,8 +32,7 @@ static size_t __do_send(struct mcast_sock *m, void *data, size_t len)
struct nethdr *net = data;
debug("send sq: %u fl:%u len:%u\n",
- ntohl(net->seq), ntohs(net->flags),
- ntohs(net->len));
+ ntohl(net->seq), net->flags, ntohs(net->len));
return mcast_send(m, net, len);
@@ -46,6 +45,7 @@ static size_t __do_prepare(struct mcast_sock *m, void *data, size_t len)
seq_set = 1;
cur_seq = time(NULL);
net->len = len;
net->seq = cur_seq++;