netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH nf-next-2.6] netfilter: ipt_REJECT: avoid touching dst ref
@ 2010-07-02 13:17 Eric Dumazet
  2010-07-05  8:40 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2010-07-02 13:17 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Netfilter Development Mailinglist

We can avoid a pair of atomic ops in ipt_REJECT send_reset()

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---

diff --git a/net/ipv4/netfilter/ipt_REJECT.c b/net/ipv4/netfilter/ipt_REJECT.c
index f5f4a88..bbbd273 100644
--- a/net/ipv4/netfilter/ipt_REJECT.c
+++ b/net/ipv4/netfilter/ipt_REJECT.c
@@ -109,7 +109,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;



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH nf-next-2.6] netfilter: ipt_REJECT: avoid touching dst ref
  2010-07-02 13:17 [PATCH nf-next-2.6] netfilter: ipt_REJECT: avoid touching dst ref Eric Dumazet
@ 2010-07-05  8:40 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2010-07-05  8:40 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Netfilter Development Mailinglist

Eric Dumazet wrote:
> We can avoid a pair of atomic ops in ipt_REJECT send_reset()
>   

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-07-05  8:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-02 13:17 [PATCH nf-next-2.6] netfilter: ipt_REJECT: avoid touching dst ref Eric Dumazet
2010-07-05  8:40 ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).