mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 21:51:05 +00:00
ipv4: use dst with ref during bcast/mcast loopback
Make sure skb dst has reference when moving to another context. Currently, I don't see protocols that can hit it when sending broadcasts/multicasts to loopback using noref dsts, so it is just a precaution. Signed-off-by: Julian Anastasov <ja@ssi.bg> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
47670b767b
commit
d52fbfc9e5
1 changed files with 1 additions and 0 deletions
|
@ -122,6 +122,7 @@ static int ip_dev_loopback_xmit(struct sk_buff *newskb)
|
||||||
newskb->pkt_type = PACKET_LOOPBACK;
|
newskb->pkt_type = PACKET_LOOPBACK;
|
||||||
newskb->ip_summed = CHECKSUM_UNNECESSARY;
|
newskb->ip_summed = CHECKSUM_UNNECESSARY;
|
||||||
WARN_ON(!skb_dst(newskb));
|
WARN_ON(!skb_dst(newskb));
|
||||||
|
skb_dst_force(newskb);
|
||||||
netif_rx_ni(newskb);
|
netif_rx_ni(newskb);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue