From owner-svn-src-stable-8@FreeBSD.ORG Tue Oct 26 11:52:28 2010 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7EDA6106564A; Tue, 26 Oct 2010 11:52:28 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 57F628FC0C; Tue, 26 Oct 2010 11:52:28 +0000 (UTC) Received: from fledge.watson.org (fledge.watson.org [65.122.17.41]) by cyrus.watson.org (Postfix) with ESMTPS id F092A46B8C; Tue, 26 Oct 2010 07:52:27 -0400 (EDT) Date: Tue, 26 Oct 2010 12:52:27 +0100 (BST) From: Robert Watson X-X-Sender: robert@fledge.watson.org To: Attilio Rao In-Reply-To: <201010251316.o9PDGB4L066137@svn.freebsd.org> Message-ID: References: <201010251316.o9PDGB4L066137@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r214338 - in stable/8/sys: netinet netinet6 X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Oct 2010 11:52:28 -0000 On Mon, 25 Oct 2010, Attilio Rao wrote: > IP_BINDANY is not correctly handled in getsockopt() case. > Fix it by specifying the correct bits. It would be nice if we had regression tests to validate this sort of thing; I think we already have something in the area of socket options, but it doesn't test for this sort of stuff... Robert > > Modified: > stable/8/sys/netinet/ip_output.c > stable/8/sys/netinet6/ip6_output.c > Directory Properties: > stable/8/sys/ (props changed) > stable/8/sys/amd64/include/xen/ (props changed) > stable/8/sys/cddl/contrib/opensolaris/ (props changed) > stable/8/sys/contrib/dev/acpica/ (props changed) > stable/8/sys/contrib/pf/ (props changed) > stable/8/sys/dev/xen/xenpci/ (props changed) > > Modified: stable/8/sys/netinet/ip_output.c > ============================================================================== > --- stable/8/sys/netinet/ip_output.c Mon Oct 25 13:13:16 2010 (r214337) > +++ stable/8/sys/netinet/ip_output.c Mon Oct 25 13:16:11 2010 (r214338) > @@ -1127,6 +1127,7 @@ ip_ctloutput(struct socket *so, struct s > case IP_FAITH: > case IP_ONESBCAST: > case IP_DONTFRAG: > + case IP_BINDANY: > switch (sopt->sopt_name) { > > case IP_TOS: > @@ -1182,6 +1183,9 @@ ip_ctloutput(struct socket *so, struct s > case IP_DONTFRAG: > optval = OPTBIT(INP_DONTFRAG); > break; > + case IP_BINDANY: > + optval = OPTBIT(INP_BINDANY); > + break; > } > error = sooptcopyout(sopt, &optval, sizeof optval); > break; > > Modified: stable/8/sys/netinet6/ip6_output.c > ============================================================================== > --- stable/8/sys/netinet6/ip6_output.c Mon Oct 25 13:13:16 2010 (r214337) > +++ stable/8/sys/netinet6/ip6_output.c Mon Oct 25 13:16:11 2010 (r214338) > @@ -1798,6 +1798,7 @@ do { \ > case IPV6_PORTRANGE: > case IPV6_RECVTCLASS: > case IPV6_AUTOFLOWLABEL: > + case IPV6_BINDANY: > switch (optname) { > > case IPV6_RECVHOPOPTS: >