diff options
| author | Xin Long <lucien.xin@gmail.com> | 2018-04-12 14:24:31 +0800 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2019-05-03 18:57:25 +0200 |
| commit | 0840edf56b874e11d7e39e6026414a6cf72a42e9 (patch) | |
| tree | d90a810a246b6d64fa50c06d57667f51fcc3c4bb /scripts/basic | |
| parent | dc133de6456cddc485e7acbef18de790f0158a64 (diff) | |
sctp: do not check port in sctp_inet6_cmp_addr
commit 1071ec9d453a38023579714b64a951a2fb982071 upstream.
pf->cmp_addr() is called before binding a v6 address to the sock. It
should not check ports, like in sctp_inet_cmp_addr.
But sctp_inet6_cmp_addr checks the addr by invoking af(6)->cmp_addr,
sctp_v6_cmp_addr where it also compares the ports.
This would cause that setsockopt(SCTP_SOCKOPT_BINDX_ADD) could bind
multiple duplicated IPv6 addresses after Commit 40b4f0fd74e4 ("sctp:
lack the check for ports in sctp_v6_cmp_addr").
This patch is to remove af->cmp_addr called in sctp_inet6_cmp_addr,
but do the proper check for both v6 addrs and v4mapped addrs.
v1->v2:
- define __sctp_v6_cmp_addr to do the common address comparison
used for both pf and af v6 cmp_addr.
Fixes: 40b4f0fd74e4 ("sctp: lack the check for ports in sctp_v6_cmp_addr")
Change-Id: Ie5bd167901f80a29cab8f09e098e2358b449fec6
Reported-by: Jianwen Ji <jiji@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
