[netfilter-cvslog] r4316 - in trunk/conntrack: . include src
pablo at netfilter.org
pablo at netfilter.org
Wed Oct 5 18:33:53 CEST 2005
Author: pablo at netfilter.org
Date: 2005-10-05 18:33:52 +0200 (Wed, 05 Oct 2005)
New Revision: 4316
Modified:
trunk/conntrack/ChangeLog
trunk/conntrack/include/libct_proto.h
trunk/conntrack/src/conntrack.c
trunk/conntrack/src/libct.c
Log:
o Fix up counters
o Fix up compilation (IPS_* stuff missing), still need a proper fix
Modified: trunk/conntrack/ChangeLog
===================================================================
--- trunk/conntrack/ChangeLog 2005-10-05 12:26:29 UTC (rev 4315)
+++ trunk/conntrack/ChangeLog 2005-10-05 16:33:52 UTC (rev 4316)
@@ -1,3 +1,9 @@
+2005-10-05
+<pablo at netfilter.org>
+ o Fix up counters
+ o Fix up compilation (IPS_* stuff missing), still need a proper fix
+ o Bumped version number to 0.82
+
2005-09-24
<laforge at netfilter.org>
o Get rid of C++ style comments
Modified: trunk/conntrack/include/libct_proto.h
===================================================================
--- trunk/conntrack/include/libct_proto.h 2005-10-05 12:26:29 UTC (rev 4315)
+++ trunk/conntrack/include/libct_proto.h 2005-10-05 16:33:52 UTC (rev 4316)
@@ -9,6 +9,13 @@
#define LIBCT_VERSION "0.1.0"
+/* FIXME: These should be independent from kernel space */
+#define IPS_ASSURED (1 << 2)
+#define IPS_SEEN_REPLY (1 << 1)
+#define IPS_SRC_NAT_DONE (1 << 7)
+#define IPS_DST_NAT_DONE (1 << 8)
+#define IPS_CONFIRMED (1 << 3)
+
struct cta_proto;
struct ctproto_handler {
Modified: trunk/conntrack/src/conntrack.c
===================================================================
--- trunk/conntrack/src/conntrack.c 2005-10-05 12:26:29 UTC (rev 4315)
+++ trunk/conntrack/src/conntrack.c 2005-10-05 16:33:52 UTC (rev 4316)
@@ -48,7 +48,7 @@
#include "libct_proto.h"
#define PROGNAME "conntrack"
-#define VERSION "0.81"
+#define VERSION "0.82"
#if 0
#define DEBUGP printf
Modified: trunk/conntrack/src/libct.c
===================================================================
--- trunk/conntrack/src/libct.c 2005-10-05 12:26:29 UTC (rev 4315)
+++ trunk/conntrack/src/libct.c 2005-10-05 16:33:52 UTC (rev 4316)
@@ -134,16 +134,18 @@
enum ctattr_type parent)
{
struct nfattr *tb[CTA_COUNTERS_MAX];
+ int dir = (parent == CTA_COUNTERS_ORIG ? CTNL_DIR_REPLY
+ : CTNL_DIR_ORIGINAL);
memset(tb, 0, CTA_COUNTERS_MAX*sizeof(struct nfattr *));
nfnl_parse_nested(tb, CTA_COUNTERS_MAX, attr);
if (tb[CTA_COUNTERS_PACKETS-1])
- ct->counters[CTNL_DIR_ORIGINAL].packets
+ ct->counters[dir].packets
= __be64_to_cpu(*(u_int64_t *)
NFA_DATA(tb[CTA_COUNTERS_PACKETS-1]));
if (tb[CTA_COUNTERS_BYTES-1])
- ct->counters[CTNL_DIR_ORIGINAL].bytes
+ ct->counters[dir].bytes
= __be64_to_cpu(*(u_int64_t *)
NFA_DATA(tb[CTA_COUNTERS_BYTES-1]));
}
More information about the netfilter-cvslog
mailing list