[LIP] ip_route_output_key

"suresh kumar" <suresh_vin-/iAzse42w/[email protected]>
Newsgroups gmane.user-groups.linux.india.programmers
Message-ID <[email protected]>
Hi,
I am capturing a packet on pre routing hook 
of eth1 interface and modifying the ip header, 
including ip addresses. I xmit the packet using
dev_queue_xmit. So I need to build the skb->dst 
entry to get the hw addr of the next hop using 
arp_find. I am calling ip_route_output_key with 
the rtable entry being (struct rtable*)(skb->dst) 
and pointer to rt_key with the values of dip sip
tos being set in host byte order. I am expecting
the routing entry to be made in to the skb->dst.
 But this function returns failure. It is a packet 
that is to be forwaded so the dip and sip can 
never be ip of the interfaces.
Can u please tell me if the proceedure followed
is correct or ne changes to be made. 

V.V Suresh Kumar


V.V Suresh Kumar


-- 
______________________________________________
IndiaInfo Mail - the free e-mail service with a difference! www.indiainfo.com 
Check out our value-added Premium features, such as an extra 20MB for mail storage, POP3, e-mail forwarding, and ads-free mailboxes!

Powered by Outblaze


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.