]> git.baikalelectronics.ru Git - kernel.git/commit
net: Fix prefsrc lookups
authorDavid Ahern <dsa@cumulusnetworks.com>
Tue, 3 Nov 2015 23:59:28 +0000 (15:59 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 5 Nov 2015 02:34:37 +0000 (21:34 -0500)
commit4c110ec467c2c9637a230c269d8c87522cfb3416
treef75c2a7a1712422891023ed0d62b77dcb7d08dfc
parentcba1b18e2c59bef5487e291616298cac7c3d0fa6
net: Fix prefsrc lookups

A bug report (https://bugzilla.kernel.org/show_bug.cgi?id=107071) noted
that the follwoing ip command is failing with v4.3:

    $ ip route add 10.248.5.0/24 dev bond0.250 table vlan_250 src 10.248.5.154
    RTNETLINK answers: Invalid argument

3d4f81d3f6ea7 changed the lookup of the given preferred source address to
use the table id passed in, but this assumes the local entries are in the
given table which is not necessarily true for non-VRF use cases. When
validating the preferred source fallback to the local table on failure.

Fixes: 3d4f81d3f6ea7 ("net: Add routes to the table associated with the device")
Signed-off-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/fib_semantics.c