From 434bca2b42ad82e3d0ab56d066716410c2ae27d5 Mon Sep 17 00:00:00 2001
From: "/C=EU/ST=EU/CN=Pablo Neira Ayuso/emailAddress=pablo@netfilter.org"
Date: Sun, 20 May 2007 20:29:53 +0000
Subject: - delete ctnl_test.c since it contains examples of the old
*deprecated* API - fix wrong port display in the XML output (Morten Isaksen)
- use ntohs instead htons in snprintf_default.c
---
src/conntrack/snprintf_xml.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'src/conntrack/snprintf_xml.c')
diff --git a/src/conntrack/snprintf_xml.c b/src/conntrack/snprintf_xml.c
index 6c3257f..669d3e8 100644
--- a/src/conntrack/snprintf_xml.c
+++ b/src/conntrack/snprintf_xml.c
@@ -182,13 +182,13 @@ static int __snprintf_proto_xml(char *buf,
case IPPROTO_SCTP:
if (type == __ADDR_SRC) {
ret = snprintf(buf, len, "%u",
- tuple->l4src.tcp.port);
+ ntohs(tuple->l4src.tcp.port));
if (ret == -1)
return -1;
buffer_size(ret, &size, &len);
} else {
ret = snprintf(buf, len, "%u",
- tuple->l4dst.tcp.port);
+ ntohs(tuple->l4dst.tcp.port));
if (ret == -1)
return -1;
buffer_size(ret, &size, &len);
--
cgit v1.2.3