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
This commit is contained in:
attilio 2010-09-24 14:38:54 +00:00
parent b0052272aa
commit d658ddc7c7
2 changed files with 5 additions and 0 deletions

View File

@ -1121,6 +1121,7 @@ ip_ctloutput(struct socket *so, struct sockopt *sopt)
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 sockopt *sopt)
case IP_DONTFRAG:
optval = OPTBIT(INP_DONTFRAG);
break;
case IP_BINDANY:
optval = OPTBIT(INP_BINDANY);
break;
}
error = sooptcopyout(sopt, &optval, sizeof optval);
break;

View File

@ -1823,6 +1823,7 @@ do { \
case IPV6_PORTRANGE:
case IPV6_RECVTCLASS:
case IPV6_AUTOFLOWLABEL:
case IPV6_BINDANY:
switch (optname) {
case IPV6_RECVHOPOPTS: