Re: Clarification of terse ip-rule statement

Grant Taylor <[email protected]> Thu, 21 Feb 2019 20:55:28 +0000
Newsgroups org.kernel.vger.lartc
Message-ID <[email protected]>
On 02/21/2019 01:23 PM, Leroy Tennison wrote:
> The reason I ask is I had a situation where a response to a packet 
> was taking the default route rather than the specific route for that 
> situation as defined in main.  The response matched a selector and it's 
> associated table had the same default route as main but no specific match. 
> When i added the specific match to that table the response packet routed 
> correctly.

This matches my understanding and experience.

I like to think of it this way:

the RPDB (ip rules) specify which routing table(s) should be traversed. 
Without any criteria otherwise, the Linux kernel will search each of the 
routing table(s) in RPDB order looking for a match.  The first match wins.

So if you had an unqualified rule to search an alternate routing table 
that had a higher (?) priority than the main routing table and that 
alternate routing table had a default route, then that's the route that 
would be used.



-- 
Grant. . . .
unix || die
smime.p7s (application/pkcs7-signature, 3.9 KB) - not displayed