[netfilter-cvslog] r6559 - trunk/libnetfilter_conntrack/utils

gandalf at netfilter.org gandalf at netfilter.org
Sun Mar 26 20:35:08 CEST 2006


Author: gandalf at netfilter.org
Date: 2006-03-26 20:35:08 +0200 (Sun, 26 Mar 2006)
New Revision: 6559

Modified:
   trunk/libnetfilter_conntrack/utils/ctnl_test.c
Log:
Fix endianess of tcp ports in the tuple.


Modified: trunk/libnetfilter_conntrack/utils/ctnl_test.c
===================================================================
--- trunk/libnetfilter_conntrack/utils/ctnl_test.c	2006-03-26 18:05:46 UTC (rev 6558)
+++ trunk/libnetfilter_conntrack/utils/ctnl_test.c	2006-03-26 18:35:08 UTC (rev 6559)
@@ -43,16 +43,16 @@
 		.dst = { .v4 = inet_addr("2.2.2.2") },
 		.l3protonum = AF_INET,
 		.protonum = IPPROTO_TCP,
-		.l4src = { .tcp = { .port = 10 } },
-		.l4dst = { .tcp = { .port = 20 } }
+		.l4src = { .tcp = { .port = ntohs(10) } },
+		.l4dst = { .tcp = { .port = ntohs(20) } }
 	};
 	struct nfct_tuple reply = {
 		.src = { .v4 = inet_addr("2.2.2.2") },
 		.dst = { .v4 = inet_addr("1.1.1.1") },
 		.l3protonum = AF_INET,
 		.protonum = IPPROTO_TCP,
-		.l4src = { .tcp = { .port = 20 } },
-		.l4dst = { .tcp = { .port = 10 } }
+		.l4src = { .tcp = { .port = ntohs(20) } },
+		.l4dst = { .tcp = { .port = ntohs(10) } }
 	};
 	union nfct_protoinfo proto = {
 		.tcp = { .state = 1 },




More information about the netfilter-cvslog mailing list