]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: add routing output fallback
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Wed, 2 Sep 2015 19:20:22 +0000 (16:20 -0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Sep 2015 22:43:05 +0000 (15:43 -0700)
commit747a29e055c28f6207481d788794bc2804fd4b29
treee9cc4151a252deba27e10e2ff06a2bd437a80b07
parent6092657e2c604f078d35c0bfab9daededb534be2
sctp: add routing output fallback

Commit 63950f0ff0e3 added a restriction that the address must belong to
the output interface, so that sctp will use the right interface even
when using secondary addresses.

But it breaks IPVS setups, on which people is used to attach VIP
addresses to loopback interface on real servers. It's preferred to
attach to the interface actually in use, but it's a very common setup
and that used to work.

This patch then saves the first routing good result, even if it would be
going out through an interface that doesn't have that address. If no
better hit found, it's then used. This effectively restores the original
behavior if no better interface could be found.

Fixes: 63950f0ff0e3 ("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>
net/sctp/protocol.c