lkml.org 
[lkml]   [2002]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectHow to make routing decision from kernel module ?
From
Date

Hi ALL,

we are a small study group at university of karlsruhe (germany)
and working on a modular ipsec implementation for linux.

One goal of the implementation is to avoid changes to the
original kernel, the complete ipsec implementation is
realized as kernel modules.

In our implementation we receive an skb/ip packet
(by NF_IP_PRE_ROUTING netfilter hook) and must know,
if the packet is for the local machine. So we need to make
a routing decision, but we only need the result of the
routing decision, not the routing itself.

(yes, we MUST do this in NF_IP_PRE_ROUTING hook, LOCAL_IN is slightly to late)

First attempt was using ip_route_input() and compare
skb.dst with ip_local_deliver/ip_forward. This fails
because of unexported symbols in the kernel (ip_local_deliver/ip_forward).

Next trial was using fib_lookup(), but it fails also
due unexported symbols.


Now we are a little bit frustrated and dont know how to make
a routing decision (that we can analyse) inside a kernel module.

Is there a possibillity to make a routing lookup from a kernel module
without hacking the kernel ?


thanks for your help

Michael Conrad
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:30    [W:0.203 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site