Subject: Re: [IPROUTE]: Add support for multipath route realms

From: Patrick McHardy <[email-masked]>
Date: Tue, 25 Jul 2006 10:21:45 +0200

Herbert Xu wrote:
> Patrick McHardy <[email-masked]> wrote:
> 
>>[IPROUTE]: Add support for multipath route realms
>>
>>Routing realms exist per nexthop, but iproute currently only allows to send
>>a single route realm, which is refused by the kernel for multipath routes.
>>Add support for specifying per nexthop realms. Old kernels only return the
>>first realm back to userspace when dumping, so the others can't be displayed,
>>besides that it will also behave correctly on old kernels.
>>
>>old kernel:
>>
>>1.2.3.4 realm 1
>>       nexthop dev dummy0 weight 1
>>       nexthop dev dummy1 weight 1
>>       nexthop dev dummy2 weight 1
>>       nexthop dev dummy3 weight 1
>>
>>new kernel:
>>
>>1.2.3.4
>>       nexthop realm 1 dev dummy0 weight 1
>>       nexthop realm 2 dev dummy1 weight 1
>>       nexthop realm 3 dev dummy2 weight 1
>>       nexthop realm 4 dev dummy3 weight 1
> 
> 
> This really looks like papering over fundamental brokenness of
> IP_ROUTE_MULTIPATH_CACHED since you wouldn't otherwise get these
> entries in the routing cache.
> 
> This reminds me that I better revisit the reasons that people gave
> for actually using IP_ROUTE_MULTIPATH_CACHED the last time we tried
> to get rid of it.

Actually it has nothing to do with MULTIPATH_CACHED, it didn't even
use it in these tests unless I seriously mixed something up. The
realm can be used by netfilter to find out which nexthop was chosen
and bind the connection to this nexthop manually using CONNMARK
and MARK.