netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [libnetfilter_acct PATCH] xml: fix inversion between pkt and bytes
@ 2014-02-03 23:14 Eric Leblond
  0 siblings, 0 replies; only message in thread
From: Eric Leblond @ 2014-02-03 23:14 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel, Eric Leblond

The nfacct_snprintf_xml used to ouput accounting in XML format
was inverting packet and bytes. This patch restores the correct
order.

Signed-off-by: Eric Leblond <eric@regit.org>
---
 src/libnetfilter_acct.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libnetfilter_acct.c b/src/libnetfilter_acct.c
index ba89e2d..77f58ce 100644
--- a/src/libnetfilter_acct.c
+++ b/src/libnetfilter_acct.c
@@ -298,8 +298,8 @@ nfacct_snprintf_xml(char *buf, size_t rem, struct nfacct *nfacct,
 			"<pkts>%.20"PRIu64"</pkts>"
 			"<bytes>%.20"PRIu64"</bytes>",
 			nfacct_attr_get_str(nfacct, NFACCT_ATTR_NAME),
-			nfacct_attr_get_u64(nfacct, NFACCT_ATTR_BYTES),
-			nfacct_attr_get_u64(nfacct, NFACCT_ATTR_PKTS));
+			nfacct_attr_get_u64(nfacct, NFACCT_ATTR_PKTS),
+			nfacct_attr_get_u64(nfacct, NFACCT_ATTR_BYTES));
 	BUFFER_SIZE(ret, size, rem, offset);
 
 	if (flags & NFACCT_SNPRINTF_F_TIME) {
-- 
1.9.rc1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-02-03 23:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-03 23:14 [libnetfilter_acct PATCH] xml: fix inversion between pkt and bytes Eric Leblond

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