diff options
author | Liping Zhang <liping.zhang@spreadtrum.com> | 2016-09-02 20:49:12 +0800 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-09-05 19:28:23 +0200 |
commit | 5210d393ef84e5d2a4854671a9af2d97fd1b8dd4 (patch) | |
tree | 25a5dd8d46c1c8474593aed3daf19d043bd45b7e /net/netfilter | |
parent | 6e1ce3c3451291142a57c4f3f6f999a29fb5b3bc (diff) | |
download | linux-5210d393ef84e5d2a4854671a9af2d97fd1b8dd4.tar.bz2 |
netfilter: nf_tables_trace: fix endiness when dump chain policy
NFTA_TRACE_POLICY attribute is big endian, but we forget to call
htonl to convert it. Fortunately, this attribute is parsed as big
endian in libnftnl.
Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r-- | net/netfilter/nf_tables_trace.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_trace.c b/net/netfilter/nf_tables_trace.c index 39eb1cc62e91..fa24a5b398b1 100644 --- a/net/netfilter/nf_tables_trace.c +++ b/net/netfilter/nf_tables_trace.c @@ -237,7 +237,7 @@ void nft_trace_notify(struct nft_traceinfo *info) break; case NFT_TRACETYPE_POLICY: if (nla_put_be32(skb, NFTA_TRACE_POLICY, - info->basechain->policy)) + htonl(info->basechain->policy))) goto nla_put_failure; break; } |