From owner-freebsd-net@FreeBSD.ORG Wed Sep 3 13:14:53 2003 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4536416A4BF for ; Wed, 3 Sep 2003 13:14:53 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.184]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7995143FB1 for ; Wed, 3 Sep 2003 13:14:52 -0700 (PDT) (envelope-from max@love2party.net) Received: from [212.227.126.155] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 19ue1h-0000Wd-00; Wed, 03 Sep 2003 22:14:49 +0200 Received: from [217.83.4.20] (helo=max900) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 19ue1h-0000yO-00; Wed, 03 Sep 2003 22:14:49 +0200 Message-ID: <00f001c37258$48bcb100$01000001@max900> From: "Max Laier" To: "Haijin Yan" , References: Date: Wed, 3 Sep 2003 22:16:38 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 cc: yan@cs.uga.edu Subject: Re: ip_forward() crash X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Sep 2003 20:14:53 -0000 So this page fault happens where? Maybe you want m_dup() rather than m_copypacket() - esp. in case you get the page fault when trying to modify the packet before sending it back to the sender. Max > Hi, > I am using freebsd 4.5 and in the ip_input.c at the place > where IP decides to forward a mbuf not destined to itself, > I added one of my function which included a call of ip_forward() to send > out a my m_copyed mbuf to the sender. so basically there are two calls to > ip_forward(), one is to relay mbuf from the sender and the other is > forward back a copy of it. However, this behavior crashed my freebsd with > trap 12 saying page fault in kernel. Does anyone have the same experience > and know what's wrong with this? > > Any suggestion is highly appreciated. > please cc to me because I am not on the list. > > Thanks, > > -Haijin Yan