netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* libnetfilter_conntrack's NFCT_OF_TIMESTAMP is not working
@ 2016-03-15  6:34 ravin goyal
  2016-03-15 10:19 ` Pablo Neira Ayuso
  0 siblings, 1 reply; 4+ messages in thread
From: ravin goyal @ 2016-03-15  6:34 UTC (permalink / raw)
  To: netfilter-devel

Hi

this email is in reference to previous email regarding the NFCT_OF_TIMESTAMP,

setting /proc/sys/net/netfilter/nf_conntrack_timestamp to 1 or 0
doesn't run the following code in
/libnetfilter_conntrack-1.0.4/src/conntrack/snprintf_default.c file

        if (flags & NFCT_OF_TIMESTAMP) {
                if (test_bit(ATTR_TIMESTAMP_START, ct->head.set)) {
                        ret = __snprintf_timestamp_start(buf+offset, len, ct);
                        BUFFER_SIZE(ret, size, len, offset);
                }
                if (test_bit(ATTR_TIMESTAMP_STOP, ct->head.set)) {
                        ret = __snprintf_timestamp_stop(buf+offset, len, ct);
                        BUFFER_SIZE(ret, size, len, offset);
                }
        }

flags and NFCT_OF_TIMESTMP is always 1 and 8 respectively no matter value of
/proc/sys/net/netfilter/nf_conntrack_timestamp is 1 or 0

So what value should i set of nf_conntrack_timestamp if i want to get
start and stop timestamp from __snprintf_timestamp_start and
__snprintf_timestamp_stop respectively.

Regards
Ravin Goyal

^ permalink raw reply	[flat|nested] 4+ messages in thread
* libnetfilter_conntrack's NFCT_OF_TIMESTAMP is not working
@ 2016-03-14  5:09 ravin goyal
  0 siblings, 0 replies; 4+ messages in thread
From: ravin goyal @ 2016-03-14  5:09 UTC (permalink / raw)
  To: netfilter-devel, netfilter; +Cc: pablo

Hii

regarding libnetfilter_conntrack I have been working on getting start
and stop timestamp of the connection, I lookup source code and found
if i enable NFCT_OF_TIMESTAMP (echo "1" >
/proc/sys/net/netfilter/nf_conntrack_timestamp)  , i will get the same
but when i ran
conntrack -E -eDESTROY -otimestamp,extended , it didn't show the start
and stop time and when i print the value it said flags=1,
NFCT_OF_TIMESTAMP is 8
somehow the following line....
if (flags & NFCT_OF_TIMESTAMP) in code
/src/conntrack/snprint_default.c doesn't match hence function
__snprintf_timestamp_start and __snprintf_timestamp_stop doesn't get
called.

I don't know how else can i set or use NFCT_OF_TIMESTAMP

any help regarding this issue would be appreciated

Regards
Ravin Goyal

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-03-15 11:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-15  6:34 libnetfilter_conntrack's NFCT_OF_TIMESTAMP is not working ravin goyal
2016-03-15 10:19 ` Pablo Neira Ayuso
     [not found]   ` <CANU0Mn2nE6nR-v_K8wMmEV4LQx5_GrS1Ea3_--yBLdYSLKEYDw@mail.gmail.com>
2016-03-15 11:12     ` Pablo Neira Ayuso
  -- strict thread matches above, loose matches on Subject: below --
2016-03-14  5:09 ravin goyal

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).