How to route a skb to a particular oif, when the fib_lookup suggests another one.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I am trying to develop a source routed mobile IP solution, and I am 
encountering the following problem:
I have to route a packet (skb) thru a particular output interface
(=wlan0), which I know will take me to destination, However my routing
table suggests a route through another interface (=eth0).  I am using
ip_route_output_key, with fl->oif = index of device I want this
packet to go to(=wlan0).
However, in the ip_route_output_slow I found that even when oif is not
0, you get a valid dev_out, however when the fib_lookup succeeds, you
merely free this old dev_out, and assign dev_out to the res.dev (ie
the one found out by the fib_lookup == eth0),
So this means that even if I specify the oif of wlan0, the packet will
still still
get routed thru eth0. Correct ?
Am I missing something?. I am also setting
tos bit RTO_ONLINK , as is done when MSG_DONTROUTE is given for udp
and raw sockets, hoping that it would make a difference, by having the
scope set to the RT_SCOPE_LINK.
Please help me. I am quite hung up on this one.
Sincerely,
--
Devesh Agrawal

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux