From 96a2418c082e6ebdf76a3dbf0c277398221c78e3 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Wed, 23 Jul 2008 16:24:26 +0200 Subject: bsf: use ntohl instead of htonl in the example Fix wrong use of htonl in the example filter. Signed-off-by: Pablo Neira Ayuso --- utils/conntrack_filter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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, }; -- cgit v1.2.3