netdev
[Top] [All Lists]

Re: [RTNETLINK] Provide real oif

To: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [RTNETLINK] Provide real oif
From: jamal <hadi@xxxxxxxxxx>
Date: 03 Dec 2003 08:51:03 -0500
Cc: netdev@xxxxxxxxxxx
In-reply-to: <E1ARULX-0000Ny-00@xxxxxxxxxxxxxxxxxxxxxxxx>
Organization: jamalopolis
References: <E1ARULX-0000Ny-00@xxxxxxxxxxxxxxxxxxxxxxxx>
Reply-to: hadi@xxxxxxxxxx
Sender: netdev-bounce@xxxxxxxxxxx
Hi,

On Wed, 2003-12-03 at 05:35, Herbert Xu wrote:

> They both have an RTA_OIF of eth0.  But RTA_OIF != rt->fl.oif.  In fact,
> RTA_OIF is the value of rt->u.dst.dev.

(to be precise: rt->u.dst.dev->ifindex)
Ok, now i understand what you are saying. In one case you taught the
kernel the oif to use in the other you let it select the default.
i.e:
ip r g x.x.x.x dev eth0
and to select the default: 
ip r g x.x.x.x
ip r l c should show them to be exact.

In your case your selection and the default just happen
to be the same device. 

I am wondering if they should have been the same resolved 
cache entry to begin with. i.e the fl->oif should not have 
been 0 rather the ifindex of eth0.
Even in the case of multipath routing, you have to wait for 
the cache to expire before selecting the next one in the slow 
path; so fl->oif of zero may not be a very useful artifact. 

cheers,
jamal



<Prev in Thread] Current Thread [Next in Thread>