Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

netfilter: ipt_REJECT: avoid touching dst ref

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>

authored by

Eric Dumazet and committed by
Patrick McHardy
b13b7125 98b0e84a

+1 -1
+1 -1
net/ipv4/netfilter/ipt_REJECT.c
··· 110 110 addr_type = RTN_LOCAL; 111 111 112 112 /* ip_route_me_harder expects skb->dst to be set */ 113 - skb_dst_set(nskb, dst_clone(skb_dst(oldskb))); 113 + skb_dst_set_noref(nskb, skb_dst(oldskb)); 114 114 115 115 if (ip_route_me_harder(nskb, addr_type)) 116 116 goto free_nskb;