summaryrefslogtreecommitdiff
path: root/src/conntrack.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/conntrack.c')
-rw-r--r--src/conntrack.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/conntrack.c b/src/conntrack.c
index fa6ae0a..20d86f9 100644
--- a/src/conntrack.c
+++ b/src/conntrack.c
@@ -591,11 +591,14 @@ static int event_cb(enum nf_conntrack_msg_type type,
output_type = NFCT_O_XML;
if (output_mask & _O_EXT)
output_flags = NFCT_OF_SHOW_LAYER3;
- if ((output_mask & _O_TMS) && !(output_mask & _O_XML)) {
- struct timeval tv;
- gettimeofday(&tv, NULL);
- printf("[%-8ld.%-6ld]\t", tv.tv_sec, tv.tv_usec);
- }
+ if (output_mask & _O_TMS) {
+ if (!(output_mask & _O_XML)) {
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ printf("[%-8ld.%-6ld]\t", tv.tv_sec, tv.tv_usec);
+ } else
+ output_flags |= NFCT_OF_TIME;
+ }
nfct_snprintf(buf, 1024, ct, type, output_type, output_flags);
printf("%s\n", buf);