mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 08:31:55 +00:00
[IPV6]: Fix leak added by udp connect dst caching fix.
Based upon a patch from Mitsuru KANDA <mk@linux-ipv6.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f36d6ab182
commit
a5e7c210fe
@ -852,10 +852,16 @@ do_append_data:
|
|||||||
else if (!corkreq)
|
else if (!corkreq)
|
||||||
err = udp_v6_push_pending_frames(sk, up);
|
err = udp_v6_push_pending_frames(sk, up);
|
||||||
|
|
||||||
if (dst && connected)
|
if (dst) {
|
||||||
ip6_dst_store(sk, dst,
|
if (connected) {
|
||||||
ipv6_addr_equal(&fl->fl6_dst, &np->daddr) ?
|
ip6_dst_store(sk, dst,
|
||||||
&np->daddr : NULL);
|
ipv6_addr_equal(&fl->fl6_dst, &np->daddr) ?
|
||||||
|
&np->daddr : NULL);
|
||||||
|
} else {
|
||||||
|
dst_release(dst);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (err > 0)
|
if (err > 0)
|
||||||
err = np->recverr ? net_xmit_errno(err) : 0;
|
err = np->recverr ? net_xmit_errno(err) : 0;
|
||||||
release_sock(sk);
|
release_sock(sk);
|
||||||
|
Loading…
Reference in New Issue
Block a user