]> git.baikalelectronics.ru Git - kernel.git/commit
sctp: Don't advertise IPv4 addresses if ipv6only is set on the socket
authorMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Wed, 24 Jun 2020 20:34:18 +0000 (17:34 -0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 25 Jun 2020 23:11:33 +0000 (16:11 -0700)
commit4af2e88c0c9bfb70bbd2a4a72a80c3fe6b4ed8b3
treea06297f6b1d9cd3faf32b37b95d1fe01191209ed
parent7f38f6b02a21f97384451a1b8f03065d4ee26abd
sctp: Don't advertise IPv4 addresses if ipv6only is set on the socket

If a socket is set ipv6only, it will still send IPv4 addresses in the
INIT and INIT_ACK packets. This potentially misleads the peer into using
them, which then would cause association termination.

The fix is to not add IPv4 addresses to ipv6only sockets.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reported-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Tested-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/constants.h
net/sctp/associola.c
net/sctp/bind_addr.c
net/sctp/protocol.c