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

netfilter: br_netfilter: use skb_set_noref()

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>

authored by

Eric Dumazet and committed by
Patrick McHardy
a8b56389 0da529a7

+2 -4
+2 -4
net/bridge/br_netfilter.c
··· 244 244 kfree_skb(skb); 245 245 return 0; 246 246 } 247 - dst_hold(&rt->u.dst); 248 - skb_dst_set(skb, &rt->u.dst); 247 + skb_dst_set_noref(skb, &rt->u.dst); 249 248 250 249 skb->dev = nf_bridge->physindev; 251 250 nf_bridge_update_protocol(skb); ··· 395 396 kfree_skb(skb); 396 397 return 0; 397 398 } 398 - dst_hold(&rt->u.dst); 399 - skb_dst_set(skb, &rt->u.dst); 399 + skb_dst_set_noref(skb, &rt->u.dst); 400 400 } 401 401 402 402 skb->dev = nf_bridge->physindev;