aboutsummaryrefslogtreecommitdiffstats
path: root/net/netfilter
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2014-01-10 09:11:25 -0500
committerPablo Neira Ayuso <pablo@netfilter.org>2014-01-10 12:26:13 -0500
commit8f46df184c31f3e97ef8c08fbf83c776f4eb5e21 (patch)
tree41e4b454aaf584eb01581725eb366ac062846ab6 /net/netfilter
parent11b57f90257c1d6a91cee720151b69e0c2020cf6 (diff)
netfilter: nf_tables: fix missing byteorder conversion in policy
When fetching the policy attribute, the byteorder conversion was missing, breaking the chain policy setting. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter')
-rw-r--r--net/netfilter/nf_tables_api.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/netfilter/nf_tables_api.c b/net/netfilter/nf_tables_api.c
index 36add31e08e7..117bbaaddde6 100644
--- a/net/netfilter/nf_tables_api.c
+++ b/net/netfilter/nf_tables_api.c
@@ -859,7 +859,7 @@ static int nf_tables_newchain(struct sock *nlsk, struct sk_buff *skb,
859 nla[NFTA_CHAIN_HOOK] == NULL) 859 nla[NFTA_CHAIN_HOOK] == NULL)
860 return -EOPNOTSUPP; 860 return -EOPNOTSUPP;
861 861
862 policy = nla_get_be32(nla[NFTA_CHAIN_POLICY]); 862 policy = ntohl(nla_get_be32(nla[NFTA_CHAIN_POLICY]));
863 switch (policy) { 863 switch (policy) {
864 case NF_DROP: 864 case NF_DROP:
865 case NF_ACCEPT: 865 case NF_ACCEPT: