]> www.infradead.org Git - users/jedix/linux-maple.git/commit
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)
committerDhaval Giani <dhaval.giani@oracle.com>
Fri, 20 Jan 2017 22:21:59 +0000 (17:21 -0500)
commit92e88f4f7ddcf90b03804cdc7f6e7f076161f160
tree2280d51c314d645afe84083eeec869ba62f9e1f9
parent11d9941d7aab189f800e0d115951d8679eaf3672
sctp: lack the check for ports in sctp_v6_cmp_addr

Orabug: 25308045

[ Upstream commit 40b4f0fd74e46c017814618d67ec9127ff20f157 ]

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: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit 67eab3249eacc0861cf57f6d929e66bf78159379)
Signed-off-by: Dhaval Giani <dhaval.giani@oracle.com>
net/sctp/ipv6.c