Received: with ECARTIS (v1.0.0; list netdev); Thu, 22 May 2003 18:00:03 -0700 (PDT) Received: from ns2.erd.epson.com (ns2.erd.epson.com [206.86.159.10]) by oss.sgi.com (8.12.9/8.12.9) with SMTP id h4N0xS2x009985 for ; Thu, 22 May 2003 17:59:30 -0700 Received: from erd.erd.epson.com (localhost [127.0.0.1]) by ns2.erd.epson.com (8.12.9/8.11.3a) with ESMTP id h4N1BKMS008568 for ; Thu, 22 May 2003 18:11:20 -0700 (PDT) Received: from erdexch1.erd.epson.com (erdexch1 [172.22.193.26]) by erd.erd.epson.com (8.9.1/8.9.1) with ESMTP id SAA21957 for ; Thu, 22 May 2003 18:02:19 -0700 (PDT) Received: by erdexch1.erd.epson.com with Internet Mail Service (5.5.2653.19) id ; Thu, 22 May 2003 18:02:40 -0700 Message-ID: From: Wai Yim To: "'netdev@oss.sgi.com'" Subject: Anyone having problem modify incoming IP packets at NetFilter Hoo k Module PREROUTING? Date: Thu, 22 May 2003 18:02:34 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-archive-position: 2693 X-ecartis-version: Ecartis v1.0.0 Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com X-original-sender: wyim@erd.epson.com Precedence: bulk X-list: netdev Hi All, I am new to Linux and NetFilter. I am trying to write a NetFilter Hook Module that hooks to both POSTROUTING and PREROUTING filter. All I am trying to do is, if an IP packet is for certain dest IP address, I will add (POSTROUTING) and take-out (PREROUTING)certain number of bytes in the packet before I pass on the packet. The POSTROUTING NetFilter hook seems working fine. I can get all of the outgoing IP packets, and I can call skb_copy_expand + skb_push for the new data. From ethereal, I see correct outgoing packets onto the network. However, here is the problem, when I get a packet at the PREROUTING, and for certain packets that are about the size of the MTU, when I call skb_copy or skb_pull, my entire system freezes right the way! Upon further investigation, when the trouble packet arrives, even reading data from skb->data using memcpy will freeze the system. I have exhausted all combination of things that I can try... Any help, idea, or direction as what else I should try or where the problem may be will be deeply appreciated. Wai