Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Dec 1997 12:24:08 -0800 (PST)
From:      Archie Cobbs <archie@whistle.com>
To:        ru@ucb.crimea.ua (Ruslan Ermilov)
Cc:        fwang2@unity.ncsu.edu, hackers@freebsd.org
Subject:   Re: help: divert sockets question
Message-ID:  <199712082024.MAA11047@bubba.whistle.com>
In-Reply-To: <199712081612.SAA11172@relay.ucb.crimea.ua> from Ruslan Ermilov at "Dec 8, 97 06:12:49 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
Ruslan Ermilov writes:
> I did it the same way. It doesn't work for me ;-(
> 
> In general, I have a packet received trhu udp from remote machine,
> and I need to write it as incoming on a local machine.
> 
> Usually, you read the packet from divert socket first using recvfrom(),
> then optionally modify it, and then write it back using sendto().
> 
> My case is differ, because I just need to write a packet as incoming,
> not reading it from divert socket first.

Make sure you're recomputing the checksum properly, etc. You might
also try to check the kernel statistics and the ipfw log (turn on
ipfw logging on all rejected packets) to see why the packet is being
dropped.

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com



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