]> git.baikalelectronics.ru Git - kernel.git/commit
ipv6: fix restrict IPV6_ADDRFORM operation
authorJohn Haxby <john.haxby@oracle.com>
Sat, 18 Apr 2020 15:30:49 +0000 (16:30 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 20 Apr 2020 18:06:39 +0000 (11:06 -0700)
commit478dace59d00a54c998830aeffa8f3291103b3e4
treef8da3459495bae1fc99eb2c2e130ea4fd32de1ea
parent4da3c53aa8aba273e00ec169ec0c6da544e6fef1
ipv6: fix restrict IPV6_ADDRFORM operation

Commit bd1a75df296b ("ipv6: restrict IPV6_ADDRFORM operation") fixed a
problem found by syzbot an unfortunate logic error meant that it
also broke IPV6_ADDRFORM.

Rearrange the checks so that the earlier test is just one of the series
of checks made before moving the socket from IPv6 to IPv4.

Fixes: bd1a75df296b ("ipv6: restrict IPV6_ADDRFORM operation")
Signed-off-by: John Haxby <john.haxby@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/ipv6_sockglue.c