Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 78302
b: refs/heads/master
c: 8b1cf0d
h: refs/heads/master
v: v3
  • Loading branch information
Patrick McHardy authored and David S. Miller committed Jan 28, 2008
1 parent 2e24665 commit 1432dd9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1999414a4ece2b8cea3fb3c4dc8fe06796256269
refs/heads/master: 8b1cf0db2aced837fcd50072e81e32c5836a1ee1
31 changes: 20 additions & 11 deletions trunk/net/netfilter/nf_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,18 @@ static int __nf_queue(struct sk_buff *skb,
}

/* Bump dev refs so they don't vanish while packet is out */
if (indev) dev_hold(indev);
if (outdev) dev_hold(outdev);

if (indev)
dev_hold(indev);
if (outdev)
dev_hold(outdev);
#ifdef CONFIG_BRIDGE_NETFILTER
if (skb->nf_bridge) {
physindev = skb->nf_bridge->physindev;
if (physindev) dev_hold(physindev);
if (physindev)
dev_hold(physindev);
physoutdev = skb->nf_bridge->physoutdev;
if (physoutdev) dev_hold(physoutdev);
if (physoutdev)
dev_hold(physoutdev);
}
#endif
afinfo->saveroute(skb, info);
Expand All @@ -156,11 +159,15 @@ static int __nf_queue(struct sk_buff *skb,

if (status < 0) {
/* James M doesn't say fuck enough. */
if (indev) dev_put(indev);
if (outdev) dev_put(outdev);
if (indev)
dev_put(indev);
if (outdev)
dev_put(outdev);
#ifdef CONFIG_BRIDGE_NETFILTER
if (physindev) dev_put(physindev);
if (physoutdev) dev_put(physoutdev);
if (physindev)
dev_put(physindev);
if (physoutdev)
dev_put(physoutdev);
#endif
module_put(info->elem->owner);
kfree(info);
Expand Down Expand Up @@ -222,8 +229,10 @@ void nf_reinject(struct sk_buff *skb, struct nf_info *info,
rcu_read_lock();

/* Release those devices we held, or Alexey will kill me. */
if (info->indev) dev_put(info->indev);
if (info->outdev) dev_put(info->outdev);
if (info->indev)
dev_put(info->indev);
if (info->outdev)
dev_put(info->outdev);
#ifdef CONFIG_BRIDGE_NETFILTER
if (skb->nf_bridge) {
if (skb->nf_bridge->physindev)
Expand Down

0 comments on commit 1432dd9

Please sign in to comment.