Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Sep 2003 16:27:39 -0400 (EDT)
From:      Haijin Yan <yan@cs.uga.edu>
To:        Max Laier <max@love2party.net>
Cc:        freebsd-net@freebsd.org
Subject:   Re: ip_forward() crash
Message-ID:  <Pine.GSO.4.44.0309031620450.2970-100000@atlas.cs.uga.edu>
In-Reply-To: <00f001c37258$48bcb100$01000001@max900>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,
 I used m_copym() to copy the incoming mbuf and tested to make sure it
returned a valid mbuf. then I changed the tcp ip header and the checksum.
then I ip_forward() the cloned mbuf followed by ip_forward() the orignal
one.
I have even wrapped ip_forward() with splnet() but still it crash the
kernel. However, if I put the m_copy and ip_forward() into a timeout
procedure, it works.

Thanks,

-Haijin
-----------------------------------------------------------
static void live(byte food, short sleep, const double work)
{  for(;;)
    future = NULL;
}
---------------------

On Wed, 3 Sep 2003, Max Laier wrote:

> 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
>
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.44.0309031620450.2970-100000>