diff options
author | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=gandalf/emailAddress=gandalf@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=gandalf/emailAddress=gandalf@netfilter.org> | 2006-03-26 18:35:08 +0000 |
---|---|---|
committer | /C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=gandalf/emailAddress=gandalf@netfilter.org </C=DE/ST=Berlin/L=Berlin/O=Netfilter Project/OU=Development/CN=gandalf/emailAddress=gandalf@netfilter.org> | 2006-03-26 18:35:08 +0000 |
commit | 0ae42cabb343fe3d43ace7b424a4ba61d60297e5 (patch) | |
tree | ba99aa2fb4f39c5884ccf81ff2dfc89d07f962f7 /utils | |
parent | f271549abb286ef9021016346afca8eb561d7e3d (diff) |
Fix endianess of tcp ports in the tuple.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/ctnl_test.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/ctnl_test.c b/utils/ctnl_test.c index 497f178..78f26d6 100644 --- a/utils/ctnl_test.c +++ b/utils/ctnl_test.c @@ -43,16 +43,16 @@ int main(int argc, char **argv) .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 }, |