Skip to content

Commit

Permalink
netfilter: br_netfilter: use skb_set_noref()
Browse files Browse the repository at this point in the history
Avoid dirtying bridge_parent_rtable refcount, using new dst noref
infrastructure.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
  • Loading branch information
Eric Dumazet authored and Patrick McHardy committed Jun 1, 2010
1 parent 0da529a commit a8b5638
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/bridge/br_netfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,7 @@ static int br_nf_pre_routing_finish_ipv6(struct sk_buff *skb)
kfree_skb(skb);
return 0;
}
dst_hold(&rt->u.dst);
skb_dst_set(skb, &rt->u.dst);
skb_dst_set_noref(skb, &rt->u.dst);

skb->dev = nf_bridge->physindev;
nf_bridge_update_protocol(skb);
Expand Down Expand Up @@ -396,8 +395,7 @@ static int br_nf_pre_routing_finish(struct sk_buff *skb)
kfree_skb(skb);
return 0;
}
dst_hold(&rt->u.dst);
skb_dst_set(skb, &rt->u.dst);
skb_dst_set_noref(skb, &rt->u.dst);
}

skb->dev = nf_bridge->physindev;
Expand Down

0 comments on commit a8b5638

Please sign in to comment.