disallow setsockopt(IPV6_V6ONLY) for already bound sockets.
Obtained from: KAME MFC after: 10 days
This commit is contained in:
parent
e3cab8dc0c
commit
6b88781acf
@ -1365,6 +1365,17 @@ do { \
|
||||
break;
|
||||
|
||||
case IPV6_V6ONLY:
|
||||
/*
|
||||
* make setsockopt(IPV6_V6ONLY)
|
||||
* available only prior to bind(2).
|
||||
* see ipng mailing list, Jun 22 2001.
|
||||
*/
|
||||
if (in6p->in6p_lport ||
|
||||
!IN6_IS_ADDR_UNSPECIFIED(&in6p->in6p_laddr))
|
||||
{
|
||||
error = EINVAL;
|
||||
break;
|
||||
}
|
||||
/*
|
||||
* XXX: BINDV6ONLY should be integrated
|
||||
* into V6ONLY.
|
||||
|
Loading…
Reference in New Issue
Block a user