Skip to content

Commit

Permalink
netfilter: ipt_REJECT: avoid touching dst ref
Browse files Browse the repository at this point in the history
We can avoid a pair of atomic ops in ipt_REJECT send_reset()

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 Jul 5, 2010
1 parent 98b0e84 commit b13b712
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/netfilter/ipt_REJECT.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static void send_reset(struct sk_buff *oldskb, int hook)
addr_type = RTN_LOCAL;

/* ip_route_me_harder expects skb->dst to be set */
skb_dst_set(nskb, dst_clone(skb_dst(oldskb)));
skb_dst_set_noref(nskb, skb_dst(oldskb));

if (ip_route_me_harder(nskb, addr_type))
goto free_nskb;
Expand Down

0 comments on commit b13b712

Please sign in to comment.