LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-31-2010, 06:52 AM   #1
Santoshkb
Member
 
Registered: Sep 2007
Posts: 56

Rep: Reputation: 15
Question 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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
packet coming through one interface route out via another interface and SNAT also saiyen2002 Linux - Networking 2 09-14-2009 06:56 PM
How to create a route to a usb0 interface? cmisip Linux - Networking 13 03-01-2007 11:07 PM
ping on wrong interface despite route ocgltd Linux - Networking 1 09-26-2005 11:23 PM
Ethernet interface - checking the status marri Programming 1 03-01-2005 12:15 PM
network interface failing at boot geniarse Linux - Hardware 2 04-18-2004 02:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:12 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration