Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Nov 2001 16:15:17 -0800 (PST)
From:      John Polstra <jdp@polstra.com>
To:        net@freebsd.org
Cc:        arr@freebsd.org
Subject:   Re: in_pcb patch -- force sin_zero & copy
Message-ID:  <200111060015.fA60FHZ53456@vashon.polstra.com>
In-Reply-To: <Pine.NEB.3.96L.1011105185832.82126F-100000@fledge.watson.org>
References:  <Pine.NEB.3.96L.1011105185832.82126F-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <Pine.NEB.3.96L.1011105185832.82126F-100000@fledge.watson.org>,
Andrew R. Reiter <arr@FreeBSD.ORG> 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




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