Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b13b7125 authored by Eric Dumazet's avatar Eric Dumazet Committed by Patrick McHardy
Browse files

netfilter: ipt_REJECT: avoid touching dst ref



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

Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent 98b0e84a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;