On Sun, Apr 28, 2002 at 10:38:27AM -0700, Anand S wrote:
> As per the netfilter howtos, i figured out that
> outgoing packets from  a machine will go to
> NF_IP_LOCAL_OUT first then routing code then
> NF_IP_POST_ROUTING. But when i looked thru the code i
> could not figure out where the routing code was
> called.

> After calling NF_HOOK() with NF_IP_LOCAL_OUT i could
> not figure out where the routing code is called. 
> Some one could through some light on this

In reality, the routing code is called first.

ip_route_output() is called by ip_build_xmit() before NF_IP_LOCAL_OUT
is called.  Hoewver, one can change the routing information from within
the LOCAL_OUT hook, since the output_maybe_reroute() function uses the
skb->dst->output() function  _after_ traversal of LOCAL_OUT.

(i.e. skb->dst can be changed in LOCAL_OUT without any problems)

-- 
Live long and prosper
- Harald Welte / [EMAIL PROTECTED]               http://www.gnumonks.org/
============================================================================
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M+ 
V-- PS++ PE-- Y++ PGP++ t+ 5-- !X !R tv-- b+++ !DI !D G+ e* h--- r++ y+(*)

Reply via email to