Xin Long 2e3ce5bc2a sctp: set sin_port for addr param when checking duplicate address
Commit b8607805dd15 ("sctp: not copying duplicate addrs to the assoc's
bind address list") tried to check for duplicate address before copying
to asoc's bind_addr list from global addr list.

But all the addrs' sin_ports in global addr list are 0 while the addrs'
sin_ports are bp->port in asoc's bind_addr list. It means even if it's
a duplicate address, af->cmp_addr will still return 0 as the their
sin_ports are different.

This patch is to fix it by setting the sin_port for addr param with
bp->port before comparing the addrs.

Fixes: b8607805dd15 ("sctp: not copying duplicate addrs to the assoc's bind address list")
Reported-by: Wei Chen <weichen@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-02-26 21:24:05 -05:00
..
2017-02-07 13:07:46 -05:00
2016-12-29 14:44:03 -05:00
2016-09-22 03:13:26 -04:00
2016-04-15 17:29:36 -04:00
2017-02-20 10:26:09 -05:00
2017-02-07 13:07:46 -05:00
2017-01-18 14:55:10 -05:00
2017-02-19 18:17:59 -05:00
2017-02-19 18:17:59 -05:00
2017-02-07 13:07:46 -05:00
2013-12-06 12:37:56 -05:00