summaryrefslogtreecommitdiffstats
path: root/net/netfilter/nft_fib.c
diff options
context:
space:
mode:
authorLiping Zhang2016-11-23 15:12:20 +0100
committerPablo Neira Ayuso2016-12-06 21:42:20 +0100
commit11583438b73fbc9117ff8afcbde8c934d0d63713 (patch)
tree3bb98c903e1421fe0f31ec80aea9ad6dd4a5c664 /net/netfilter/nft_fib.c
parentnetfilter: x_tables: pack percpu counter allocations (diff)
downloadkernel-qcow2-linux-11583438b73fbc9117ff8afcbde8c934d0d63713.tar.gz
kernel-qcow2-linux-11583438b73fbc9117ff8afcbde8c934d0d63713.tar.xz
kernel-qcow2-linux-11583438b73fbc9117ff8afcbde8c934d0d63713.zip
netfilter: nft_fib: convert htonl to ntohl properly
Acctually ntohl and htonl are identical, so this doesn't affect anything, but it is conceptually wrong. Signed-off-by: Liping Zhang <zlpnobody@gmail.com> Acked-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_fib.c')
-rw-r--r--net/netfilter/nft_fib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nft_fib.c b/net/netfilter/nft_fib.c
index 249c9b80c150..29a4906adc27 100644
--- a/net/netfilter/nft_fib.c
+++ b/net/netfilter/nft_fib.c
@@ -86,7 +86,7 @@ int nft_fib_init(const struct nft_ctx *ctx, const struct nft_expr *expr,
if ((priv->flags & (NFTA_FIB_F_SADDR | NFTA_FIB_F_DADDR)) == 0)
return -EINVAL;
- priv->result = htonl(nla_get_be32(tb[NFTA_FIB_RESULT]));
+ priv->result = ntohl(nla_get_be32(tb[NFTA_FIB_RESULT]));
priv->dreg = nft_parse_register(tb[NFTA_FIB_DREG]);
switch (priv->result) {