sctp: lack the check for ports in sctp_v6_cmp_addr
authorXin Long <lucien.xin@gmail.com>
Sun, 28 Feb 2016 02:03:51 +0000 (10:03 +0800)
committerWilly Tarreau <w@1wt.eu>
Tue, 7 Jun 2016 08:42:48 +0000 (10:42 +0200)
commit9ad2f2e8e1ddc3844df8c96cc0d18c61e3416512
tree9232cfa7cc22417be9a49734ec7c9911803768a9
parent6bd21b4a2c0c5691b57f1e7748d6688acfb04def
sctp: lack the check for ports in sctp_v6_cmp_addr

commit 40b4f0fd74e46c017814618d67ec9127ff20f157 upstream.

As the member .cmp_addr of sctp_af_inet6, sctp_v6_cmp_addr should also check
the port of addresses, just like sctp_v4_cmp_addr, cause it's invoked by
sctp_cmp_addr_exact().

Now sctp_v6_cmp_addr just check the port when two addresses have different
family, and lack the port check for two ipv6 addresses. that will make
sctp_hash_cmp() cannot work well.

so fix it by adding ports comparison in sctp_v6_cmp_addr().

Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Willy Tarreau <w@1wt.eu>
net/sctp/ipv6.c