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:
parent
b0052272aa
commit
d658ddc7c7
@ -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;
|
||||
|
@ -1823,6 +1823,7 @@ do { \
|
||||
case IPV6_PORTRANGE:
|
||||
case IPV6_RECVTCLASS:
|
||||
case IPV6_AUTOFLOWLABEL:
|
||||
case IPV6_BINDANY:
|
||||
switch (optname) {
|
||||
|
||||
case IPV6_RECVHOPOPTS:
|
||||
|
Loading…
Reference in New Issue
Block a user