sctp: fix dst leak
Commit0ca50d12fe
failed to release the reference to dst entries that it decided to skip. Fixes:0ca50d12fe
("sctp: fix src address selection if using secondary addresses") Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
4548a697e4
commit
d82f0f1fc8
@ -511,8 +511,10 @@ static void sctp_v4_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
|
|||||||
*/
|
*/
|
||||||
odev = __ip_dev_find(sock_net(sk), laddr->a.v4.sin_addr.s_addr,
|
odev = __ip_dev_find(sock_net(sk), laddr->a.v4.sin_addr.s_addr,
|
||||||
false);
|
false);
|
||||||
if (!odev || odev->ifindex != fl4->flowi4_oif)
|
if (!odev || odev->ifindex != fl4->flowi4_oif) {
|
||||||
|
dst_release(&rt->dst);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
dst = &rt->dst;
|
dst = &rt->dst;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user