[libnetfilter_conntrack] bsf: use ntohl instead of htonl in the example
Pablo Neira
netfilter-cvslog-bounces at lists.netfilter.org
Wed Jul 23 16:24:36 CEST 2008
Gitweb: http://git.netfilter.org/cgi-bin/gitweb.cgi?p=libnetfilter_conntrack.git;a=commit;h=96a2418c082e6ebdf76a3dbf0c277398221c78e3
commit 96a2418c082e6ebdf76a3dbf0c277398221c78e3
Author: Pablo Neira Ayuso <pablo at netfilter.org>
AuthorDate: Wed Jul 23 16:24:26 2008 +0200
Commit: Pablo Neira Ayuso <pablo at netfilter.org>
CommitDate: Wed Jul 23 16:24:26 2008 +0200
bsf: use ntohl instead of htonl in the example
Fix wrong use of htonl in the example filter.
Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
via 96a2418c082e6ebdf76a3dbf0c277398221c78e3 (commit)
from d65c9ce404a5a3dc4de220189daaf610f4ec306e (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 96a2418c082e6ebdf76a3dbf0c277398221c78e3
Author: Pablo Neira Ayuso <pablo at netfilter.org>
Date: Wed Jul 23 16:24:26 2008 +0200
bsf: use ntohl instead of htonl in the example
Fix wrong use of htonl in the example filter.
Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
-----------------------------------------------------------------------
utils/conntrack_filter.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
Fix wrong use of htonl in the example filter.
Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
diff --git a/utils/conntrack_filter.c b/utils/conntrack_filter.c
index eb26189..fdaea68 100644
--- a/utils/conntrack_filter.c
+++ b/utils/conntrack_filter.c
@@ -53,8 +53,9 @@ int main()
nfct_filter_add_attr(filter, NFCT_FILTER_L4PROTO_STATE, &filter_proto);
+ /* BSF always wants data in host-byte order */
struct nfct_filter_ipv4 filter_ipv4 = {
- .addr = htonl(inet_addr("127.0.0.1")),
+ .addr = ntohl(inet_addr("127.0.0.1")),
.mask = 0xffffffff,
};
More information about the netfilter-cvslog
mailing list