From owner-freebsd-net Tue Nov 7 14: 2:41 2000 Delivered-To: freebsd-net@freebsd.org Received: from iguana.aciri.org (iguana.aciri.org [192.150.187.36]) by hub.freebsd.org (Postfix) with ESMTP id 13E8837B479 for ; Tue, 7 Nov 2000 14:02:39 -0800 (PST) Received: (from rizzo@localhost) by iguana.aciri.org (8.9.3/8.9.3) id OAA03771; Tue, 7 Nov 2000 14:02:24 -0800 (PST) (envelope-from rizzo) From: Luigi Rizzo Message-Id: <200011072202.OAA03771@iguana.aciri.org> Subject: Re: setting source address for UDP packets In-Reply-To: <200011072156.QAA87433@khavrinen.lcs.mit.edu> from Garrett Wollman at "Nov 7, 2000 4:56:23 pm" To: wollman@khavrinen.lcs.mit.edu (Garrett Wollman) Date: Tue, 7 Nov 2000 14:02:24 -0800 (PST) Cc: tmoestl@gmx.net, freebsd-net@FreeBSD.ORG, rizzo@aciri.org (Luigi Rizzo) X-Mailer: ELM [version 2.4ME+ PL43 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > > is there any way to set the source address of an UDP (over IPv4) packet > > without using bind() or changing the socket state, > > No. This is a long-standing bug. It shouldn't be too hard to fix if > you're up to a bit of kernel hacking. you mean by adding a sendto_from() system call where you also pass the address for the source ? Or [really dirty hack here] an extended sendto() where the sockaddr really points to an array of two addresses (with "tolen" set accordingly) ? cheers luigi ----------------------------------+----------------------------------------- Luigi RIZZO, luigi@iet.unipi.it . ACIRI/ICSI (on leave from Univ. di Pisa) http://www.iet.unipi.it/~luigi/ . 1947 Center St, Berkeley CA 94704 Phone: (510) 666 2927 ----------------------------------+----------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message