Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf
Pablo Neira Ayuso says: ==================== Netfilter fixes for net The following patchset contains Netfilter fixes for your net tree, they are: 1) Fix a crash in nf_tables when dictionaries are used from the ruleset, due to memory corruption, from Florian Westphal. 2) Fix another crash in nf_queue when used with br_netfilter. Also from Florian. Both fixes are related to new stuff that got in 4.0-rc. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
39376ccb19
@ -39,12 +39,24 @@ static inline void br_drop_fake_rtable(struct sk_buff *skb)
|
||||
|
||||
static inline int nf_bridge_get_physinif(const struct sk_buff *skb)
|
||||
{
|
||||
return skb->nf_bridge ? skb->nf_bridge->physindev->ifindex : 0;
|
||||
struct nf_bridge_info *nf_bridge;
|
||||
|
||||
if (skb->nf_bridge == NULL)
|
||||
return 0;
|
||||
|
||||
nf_bridge = skb->nf_bridge;
|
||||
return nf_bridge->physindev ? nf_bridge->physindev->ifindex : 0;
|
||||
}
|
||||
|
||||
static inline int nf_bridge_get_physoutif(const struct sk_buff *skb)
|
||||
{
|
||||
return skb->nf_bridge ? skb->nf_bridge->physoutdev->ifindex : 0;
|
||||
struct nf_bridge_info *nf_bridge;
|
||||
|
||||
if (skb->nf_bridge == NULL)
|
||||
return 0;
|
||||
|
||||
nf_bridge = skb->nf_bridge;
|
||||
return nf_bridge->physoutdev ? nf_bridge->physoutdev->ifindex : 0;
|
||||
}
|
||||
|
||||
static inline struct net_device *
|
||||
|
@ -4340,7 +4340,6 @@ static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data,
|
||||
case NFT_CONTINUE:
|
||||
case NFT_BREAK:
|
||||
case NFT_RETURN:
|
||||
desc->len = sizeof(data->verdict);
|
||||
break;
|
||||
case NFT_JUMP:
|
||||
case NFT_GOTO:
|
||||
@ -4355,10 +4354,10 @@ static int nft_verdict_init(const struct nft_ctx *ctx, struct nft_data *data,
|
||||
|
||||
chain->use++;
|
||||
data->verdict.chain = chain;
|
||||
desc->len = sizeof(data);
|
||||
break;
|
||||
}
|
||||
|
||||
desc->len = sizeof(data->verdict);
|
||||
desc->type = NFT_DATA_VERDICT;
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user