提交 d82f0f1f 编写于 作者: M Marcelo Ricardo Leitner 提交者: David S. Miller

sctp: fix dst leak

Commit 0ca50d12 failed to release the reference to dst entries that
it decided to skip.

Fixes: 0ca50d12 ("sctp: fix src address selection if using secondary addresses")
Signed-off-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4548a697
...@@ -511,8 +511,10 @@ static void sctp_v4_get_dst(struct sctp_transport *t, union sctp_addr *saddr, ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册