mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 08:02:07 +00:00
Merge branch 'sctp-fixes'
Marcelo Ricardo Leitner says: ==================== couple of sctp fixes for0ca50d12fe
These are two fixes for sctp after my patch on0ca50d12fe
("sctp: fix src address selection if using secondary addresses") The first, fix a dst leak on those it decided to skip. The second, adds the fallback on src selection that Vlad had asked about. Unfortunatelly a lot of ipvs setups relies on the old behavior and I don't see a better fix for it. Please consider both to -stable tree. ==================== Acked-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Vlad Yasevich <vyasevich@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
724a7636ad
@ -506,14 +506,22 @@ static void sctp_v4_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
|
||||
if (IS_ERR(rt))
|
||||
continue;
|
||||
|
||||
if (!dst)
|
||||
dst = &rt->dst;
|
||||
|
||||
/* Ensure the src address belongs to the output
|
||||
* interface.
|
||||
*/
|
||||
odev = __ip_dev_find(sock_net(sk), laddr->a.v4.sin_addr.s_addr,
|
||||
false);
|
||||
if (!odev || odev->ifindex != fl4->flowi4_oif)
|
||||
if (!odev || odev->ifindex != fl4->flowi4_oif) {
|
||||
if (&rt->dst != dst)
|
||||
dst_release(&rt->dst);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (dst != &rt->dst)
|
||||
dst_release(dst);
|
||||
dst = &rt->dst;
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user