[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CALyraeOdiCD+cbQZoyRZYPmzC3Kzivk8daK=PYT8uT9HwFpacQ@mail.gmail.com>
Date: Mon, 10 Dec 2012 15:12:38 -0500
From: Sri Ram Vemulpali <sri.ram.gmu06@...il.com>
To: linux-netdev <netdev@...r.kernel.org>,
linux-kernel-mail <linux-kernel@...r.kernel.org>,
linux-newbie@...r.kernel.org
Subject: netfilter question
Hi Guys,
I am writing a netfilter hooks module for applying kernel rules on
incoming packets. I am implementing hook at NF_IP_PRE_ROUTING.
>From my understanding, after sk_buff passing NF_IP_PRE_ROUTING hook
enters into ip_forward (routing) path, which will determine whether
packet is for local host, if not for local host, then routes to
destination host based on IP header destination info through local
host interface.
My question is, if I modify sk_buff packet ip header info at
NF_IP_PRE_ROUTING hook, with values of external host ip (destination
host), therefore I think this packet will be routed to destination
host from right source interface. Instead passing it to local host.
Please correct my assumption. Or is anything more I should be doing.
Because I am building a system to route the packets applying kernel
rules.
thanks in advance.
--
Regards,
Sri.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists