ip_route_output_key failing while checking interface to route
Hi,
I want to find out what interface does a route to an IP address belong to - is it better to use ip_route_output_key or
fib_validate_source(but its not with EXPORT_SYMBOL hence i went with ip_route_output_key).
But ip_route_output_key is giving failure
Code Snippet
struct flowi fl = {
.oif= oif,
.nl_u = {
.ip4_u = {
.daddr = htonl(skb->saddr),
.saddr = 0,
.tos = 0}
},
.proto = 0,
};
if(ip_route_output_key(&rt, &fl) != 0)
{
}
I am expecting the routing interface entry to be made in to the rt->u.dst.dev.
But ip_route_output_key function returns failure.
Can u please tell me if the procedure followed
is correct or not changes to be made.
Thanks in advance
-Santosh
|