From owner-freebsd-net Wed Feb 12 11: 1:37 2003 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 A657A37B401 for ; Wed, 12 Feb 2003 11:01:36 -0800 (PST) Received: from laptop.tenebras.com (laptop.tenebras.com [66.92.188.18]) by mx1.FreeBSD.org (Postfix) with SMTP id 33C1443FB1 for ; Wed, 12 Feb 2003 11:01:35 -0800 (PST) (envelope-from kudzu@tenebras.com) Received: (qmail 60680 invoked from network); 12 Feb 2003 19:01:34 -0000 Received: from sapphire.tenebras.com (HELO tenebras.com) (192.168.188.241) by 0 with SMTP; 12 Feb 2003 19:01:34 -0000 Message-ID: <3E4A9A0D.7090105@tenebras.com> Date: Wed, 12 Feb 2003 11:01:33 -0800 From: Michael Sierchio User-Agent: Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.3a) Gecko/20021212 X-Accept-Language: en-us, en MIME-Version: 1.0 To: soheil soheil Cc: freebsd-net@freebsd.org Subject: Re: Divert Socket Send Functionality References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org soheil soheil wrote: > Hi there > I want to know if i change the dst ip addr. of a packet the socket sent > sys call won't change it, will it ? > in other words will the divert socket type change the ip address itself ? Huh? The process at the other end of the divert socket may rewrite any part of it. natd may change the dst address and recalculate the checksum. For ICMP error packets, it even rewrites the address of the included offending packet. You'd better correct the checksum if you mess with any part of the header (or contents, in the case of tcp). See /usr/src/sbin/natd for code examples. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message