diff options
| author | James Morris <james.l.morris@oracle.com> | 2017-11-29 12:47:41 +1100 | 
|---|---|---|
| committer | James Morris <james.l.morris@oracle.com> | 2017-11-29 12:47:41 +1100 | 
| commit | cf40a76e7d5874bb25f4404eecc58a2e033af885 (patch) | |
| tree | 8fd81cbea03c87b3d41d7ae5b1d11eadd35d6ef5 /net/ipv6/ipv6_sockglue.c | |
| parent | ab5348c9c23cd253f5902980d2d8fe067dc24c82 (diff) | |
| parent | 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff) | |
Merge tag 'v4.15-rc1' into next-seccomp
Linux 4.15-rc1
Diffstat (limited to 'net/ipv6/ipv6_sockglue.c')
| -rw-r--r-- | net/ipv6/ipv6_sockglue.c | 13 | 
1 files changed, 12 insertions, 1 deletions
| diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 02d795fe3d7f..b9404feabd78 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c @@ -242,7 +242,6 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,  			pktopt = xchg(&np->pktoptions, NULL);  			kfree_skb(pktopt); -			sk->sk_destruct = inet_sock_destruct;  			/*  			 * ... and add it to the refcnt debug socks count  			 * in the new family. -acme @@ -378,6 +377,14 @@ static int do_ipv6_setsockopt(struct sock *sk, int level, int optname,  		retv = 0;  		break; +	case IPV6_FREEBIND: +		if (optlen < sizeof(int)) +			goto e_inval; +		/* we also don't have a separate freebind bit for IPV6 */ +		inet_sk(sk)->freebind = valbool; +		retv = 0; +		break; +  	case IPV6_RECVORIGDSTADDR:  		if (optlen < sizeof(int))  			goto e_inval; @@ -1215,6 +1222,10 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname,  		val = inet_sk(sk)->transparent;  		break; +	case IPV6_FREEBIND: +		val = inet_sk(sk)->freebind; +		break; +  	case IPV6_RECVORIGDSTADDR:  		val = np->rxopt.bits.rxorigdstaddr;  		break; | 
