Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jun 2005 20:05:58 +0300
From:      Giorgos Keramidas <keramida@freebsd.org>
To:        Christian Kuhtz <christian@kuhtz.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: divert sock api q
Message-ID:  <20050607170558.GC1811@gothmog.gr>
In-Reply-To: <42A5BCEB.8020109@kuhtz.com>
References:  <mailman.991.1118157499.80553.freebsd-net@freebsd.org> <42A5BCEB.8020109@kuhtz.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2005-06-07 11:27, Christian Kuhtz <christian@kuhtz.com> wrote:
> I'm using the DIVERT socket API for a proof of concept lab setup here,
> and I could use some help..
>
> Two boxes are involved, packets traverse both in series.  The first one,
> lets call her A, is taking the UDP packet off the wire, inserts a few
> bytes after the UDP header, and sticks it back on the wire.  The second
> machine, lets call her B, grabs the packet as it comes in, strips the
> bytes we inserted, and sticks it back on the wire.
>
> Or so goes the theory.
>
> What I'm running into is the following.. When I sendto() the modified
> frame on A, the size is correctly reported as what the frame was
> modified to be.  When the frame arrives on B, I only recvfrom() as many
> bytes as the virgin packet used to be when it entered A prior to the
> modification.

Maybe this is a silly question, as it's been a long while since I last
worked with DUMMYNET, but are you also updating the IP header ip_len?




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050607170558.GC1811>