summaryrefslogtreecommitdiff
path: root/net/netfilter/nft_queue.c
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2014-02-06 09:17:41 +0000
committerPablo Neira Ayuso <pablo@netfilter.org>2014-02-06 11:41:38 +0100
commitb8ecbee67c732ef9fc47fcf50aed6b7bb6231d98 (patch)
treedac36b02c3026506d5fe2199ebbd0cc6e10ee61b /net/netfilter/nft_queue.c
parent05513e9e33dbded8124567466a444d32173eecc6 (diff)
netfilter: nf_tables: fix log/queue expressions for NFPROTO_INET
The log and queue expressions both store the family during ->init() and use it to deliver packets. This is wrong when used in NFPROTO_INET since they should both deliver to the actual AF of the packet, not the dummy NFPROTO_INET. Use the family from the hook ops to fix this. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_queue.c')
-rw-r--r--net/netfilter/nft_queue.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/netfilter/nft_queue.c b/net/netfilter/nft_queue.c
index cbea473d69e9..e8ae2f6bf232 100644
--- a/net/netfilter/nft_queue.c
+++ b/net/netfilter/nft_queue.c
@@ -25,7 +25,6 @@ struct nft_queue {
u16 queuenum;
u16 queues_total;
u16 flags;
- u8 family;
};
static void nft_queue_eval(const struct nft_expr *expr,
@@ -43,7 +42,7 @@ static void nft_queue_eval(const struct nft_expr *expr,
queue = priv->queuenum + cpu % priv->queues_total;
} else {
queue = nfqueue_hash(pkt->skb, queue,
- priv->queues_total, priv->family,
+ priv->queues_total, pkt->ops->pf,
jhash_initval);
}
}
@@ -71,7 +70,6 @@ static int nft_queue_init(const struct nft_ctx *ctx,
return -EINVAL;
init_hashrandom(&jhash_initval);
- priv->family = ctx->afi->family;
priv->queuenum = ntohs(nla_get_be16(tb[NFTA_QUEUE_NUM]));
if (tb[NFTA_QUEUE_TOTAL] != NULL)