Skip to content

Commit

Permalink
netfilter: nf_tables_trace: fix endiness when dump chain policy
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liping Zhang authored and Pablo Neira Ayuso committed Sep 5, 2016
1 parent 6e1ce3c commit 5210d39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/netfilter/nf_tables_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5210d39

Please sign in to comment.