From owner-freebsd-net Mon Nov 5 16:15:23 2001 Delivered-To: freebsd-net@freebsd.org Received: from wall.polstra.com (wall-gw.polstra.com [206.213.73.130]) by hub.freebsd.org (Postfix) with ESMTP id 0AF1837B417; Mon, 5 Nov 2001 16:15:18 -0800 (PST) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.11.3/8.11.3) with ESMTP id fA60FHY12396; Mon, 5 Nov 2001 16:15:17 -0800 (PST) (envelope-from jdp@wall.polstra.com) Received: (from jdp@localhost) by vashon.polstra.com (8.11.6/8.11.0) id fA60FHZ53456; Mon, 5 Nov 2001 16:15:17 -0800 (PST) (envelope-from jdp) Date: Mon, 5 Nov 2001 16:15:17 -0800 (PST) Message-Id: <200111060015.fA60FHZ53456@vashon.polstra.com> To: net@freebsd.org From: John Polstra Cc: arr@freebsd.org Subject: Re: in_pcb patch -- force sin_zero & copy In-Reply-To: References: Organization: Polstra & Co., Seattle, WA 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 In article , Andrew R. Reiter wrote: > On Mon, 5 Nov 2001, Garrett Wollman wrote: > > :There's no reason to do this. in_pcbbind() is ultimately called from > :bind(2), which is already giving us a fresh copy. > : > > mmm, good point. Then the fix should just be just to zero out the > sin_zero field forcefully... > > jdp, any comments? As I said before in private mail: 1) It is Just Wrong for in_pcbbind to be scribbling into the sockaddr_in struct, but 2) there is already code there which overwrites the sin_port field, complete with a comment that says "yech...", and 3) it doesn't offend me enough to make a stink about it. It's wrong, but it's not wrong enough to merit this much hand-wringing. Just do it. John -- John Polstra John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message