Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Sep 2010 14:38:54 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r213101 - in head/sys: netinet netinet6
Message-ID:  <201009241438.o8OEcsvR027429@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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:



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