Skip to content
  • Marcelo Ricardo Leitner's avatar
    sctp: add routing output fallback · 410f0383
    Marcelo Ricardo Leitner authored
    Commit 0ca50d12 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: 0ca50d12
    
     ("sctp: fix src address selection if using secondary addresses")
    Signed-off-by: default avatarMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    410f0383