From owner-svn-src-all@FreeBSD.ORG Fri Jan 9 20:02:53 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0B451065675; Fri, 9 Jan 2009 20:02:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by mx1.freebsd.org (Postfix) with ESMTP id 3D6508FC16; Fri, 9 Jan 2009 20:02:53 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by qw-out-2122.google.com with SMTP id 9so5626333qwb.7 for ; Fri, 09 Jan 2009 12:02:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=MGOF4TTUu6TliLz3ddtjwfvMNIcUlWlkqaJwhHoTPs4=; b=BpyrQMowcDu+SMPtCDSiCZVpXWPpAnijLi4IqFbMViqCc+M9EJcA+p6PEcw33CCLSk AUm9hRK6bfoXRu0W/I67+trOFpqjBHCqH/5QzxBK/a3kiY4Q0b4D7fSOD2h56ncgarzx 3+W8vwSH93k8E+wyjXoy2uJJJnRO4t4dw5nFE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=OKuEVpqqvZPlzpmFqp+ipzSMenaSSnL2/68qnPS5LMF1ZY1dDBVoBnireHeT9tTb07 bfeBu4234XeZkoMXKVOBL6SfozKRUHQxTxmx7xMjvH2LTuVYgc82wuFBNpBDr/x2jaF9 96HBTnf3hHdn3pQcdwyUPLnkjzDUIrzUZS0Hs= Received: by 10.214.216.5 with SMTP id o5mr23320027qag.229.1231531372603; Fri, 09 Jan 2009 12:02:52 -0800 (PST) Received: by 10.214.81.13 with HTTP; Fri, 9 Jan 2009 12:02:52 -0800 (PST) Message-ID: Date: Fri, 9 Jan 2009 15:02:52 -0500 From: "Adrian Chadd" Sender: adrian.chadd@gmail.com To: "Attila Nagy" In-Reply-To: <4967A500.30205@fsn.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200901091602.n09G2Jj1061164@svn.freebsd.org> <4967A500.30205@fsn.hu> X-Google-Sender-Auth: bf8a3ae4b0dc2c01 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r186955 - in head/sys: conf netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Jan 2009 20:02:54 -0000 I wasn't even aware of the existance of this interface. I'll check it out. Thing is, this is a socket layer option, rather than what I've committed which is a netinet layer option. Anyway, I'll check it out. I'm happy to fiddle with things if others' would like it. Adrian 2009/1/9 Attila Nagy : > Hello, > > Adrian Chadd wrote: >> >> Author: adrian >> Date: Fri Jan 9 16:02:19 2009 >> New Revision: 186955 >> URL: http://svn.freebsd.org/changeset/base/186955 >> >> Log: >> Implement a new IP option (not compiled/enabled by default) to allow >> applications to specify a non-local IP address when bind()'ing a socket >> to a local endpoint. >> This allows applications to spoof the client IP address of connections >> if (obviously!) they somehow are able to receive the traffic normally >> destined to said clients. >> This patch doesn't include any changes to ipfw or the bridging code to >> redirect the client traffic through the PCB checks so TCP gets a shot >> at it. The normal behaviour is that packets with a non-local destination >> IP address are not handled locally. This can be dealth with some IPFW >> hackery; >> modifications to IPFW to make this less hacky will occur in subsequent >> commmits. >> Thanks to Julian Elischer and others at Ironport. This work was >> approved >> and donated before Cisco acquired them. >> Obtained from: Julian Elischer and others >> MFC after: 2 weeks >> > > Wouldn't it be better to implement existing interfaces for that? > OpenBSD has a SO_BINDANY socket option and it seems it's also in BSD/OS: > http://marc.info/?l=openbsd-cvs&w=2&r=1&s=bindany&q=b > >