From: "jblicn" Subject: How to reflect received packet in PreRouting hook Date: Sun, 30 Mar 2003 02:12:51 -0500 Sender: netfilter-devel-admin@lists.netfilter.org Message-ID: <000401c2f68b$c7b54d30$fe9d10ac@ljb> Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: To: Errors-To: netfilter-devel-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: List-Id: netfilter-devel.vger.kernel.org Dear all, I am developing a kernel module to handle IP packet. My problem is how to reflect received packet to the sender. I got the packet by a NF_PRE_ROUTING hook. I switched the source and destination address( which is local address ) of the IP header, and then return NF_ACCEPT.But after doing this, the packet will be dropped. If I switch the src and dst address, and modify the src(local) address to be a non local address. The packet will traverse the FORWARD and POST_ROUTING hooks, and will be send back to the sender. But change the src address to be a non-local address is not allowed in my project. How to solve this problem. Thank you very much Jiangbo Li