* why counters in nf_conntrack not set in centos 6.x?
@ 2013-12-11 15:05 medialy
0 siblings, 0 replies; only message in thread
From: medialy @ 2013-12-11 15:05 UTC (permalink / raw)
To: netfilter-devel
An application based on libnetfilter_conntrack and libnfnetlink failed to get counters in CentOS 6.x,
but it works works fine with the same code in CentOS 5.x. How to enable the counter functionality?
Sample code:
handle_conntrack_ = nfct_open(CONNTRACK, NF_NETLINK_CONNTRACK_DESTROY);
nfct_callback_register(handle_conntrack_, NFCT_T_ALL, conntrack_callback, NULL);
static int conntrack_callback(enum nf_conntrack_msg_type type, struct nf_conntrack* ct, void* data)
{
struct __nfct_counters orig_counter = ct->counters[__DIR_ORIG];
struct __nfct_counters repl_counter = ct->counters[__DIR_REPL];
//in CentOS 6.x, orig_counter.packets,orig_counter.bytes,repl_counter.packets and repl_counter.bytes are not set(zero)
}
OS and library version:
CentOS 6.4 x86_64
libnfnetlink-1.0.0
libnetfilter_conntrack-0.0.100
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-12-11 15:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-11 15:05 why counters in nf_conntrack not set in centos 6.x? medialy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).