From owner-svn-src-head@FreeBSD.ORG Fri Sep 24 14:38:54 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C4383106566C; Fri, 24 Sep 2010 14:38:54 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2EAE8FC14; Fri, 24 Sep 2010 14:38:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8OEcs06027432; Fri, 24 Sep 2010 14:38:54 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8OEcsvR027429; Fri, 24 Sep 2010 14:38:54 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201009241438.o8OEcsvR027429@svn.freebsd.org> From: Attilio Rao Date: Fri, 24 Sep 2010 14:38:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r213101 - in head/sys: netinet netinet6 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Sep 2010 14:38:54 -0000 Author: attilio Date: Fri Sep 24 14:38:54 2010 New Revision: 213101 URL: http://svn.freebsd.org/changeset/base/213101 Log: IP_BINDANY is not correctly handled in getsockopt() case. Fix it by specifying the correct bits. Sponsored by: Sandvine Incorporated Reviewed by: bz, emaste, rstone Obtained from: Sandvine Incorporated MFC after: 10 days Modified: head/sys/netinet/ip_output.c head/sys/netinet6/ip6_output.c Modified: head/sys/netinet/ip_output.c ============================================================================== --- head/sys/netinet/ip_output.c Fri Sep 24 13:01:01 2010 (r213100) +++ head/sys/netinet/ip_output.c Fri Sep 24 14:38:54 2010 (r213101) @@ -1121,6 +1121,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: @@ -1176,6 +1177,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: head/sys/netinet6/ip6_output.c ============================================================================== --- head/sys/netinet6/ip6_output.c Fri Sep 24 13:01:01 2010 (r213100) +++ head/sys/netinet6/ip6_output.c Fri Sep 24 14:38:54 2010 (r213101) @@ -1823,6 +1823,7 @@ do { \ case IPV6_PORTRANGE: case IPV6_RECVTCLASS: case IPV6_AUTOFLOWLABEL: + case IPV6_BINDANY: switch (optname) { case IPV6_RECVHOPOPTS: