mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 14:42:24 +00:00
[SCTP] bug: sctp_find_unmatch_addr() compares net-endian to host-endian
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
39940a48c4
commit
d5c747f6ef
@ -332,12 +332,14 @@ union sctp_addr *sctp_find_unmatch_addr(struct sctp_bind_addr *bp,
|
||||
|
||||
addr_buf = (union sctp_addr *)addrs;
|
||||
for (i = 0; i < addrcnt; i++) {
|
||||
union sctp_addr tmp;
|
||||
addr = (union sctp_addr *)addr_buf;
|
||||
af = sctp_get_af_specific(addr->v4.sin_family);
|
||||
if (!af)
|
||||
return NULL;
|
||||
flip_to_h(&tmp, addr);
|
||||
|
||||
if (opt->pf->cmp_addr(&laddr->a, addr, opt))
|
||||
if (opt->pf->cmp_addr(&laddr->a, &tmp, opt))
|
||||
break;
|
||||
|
||||
addr_buf += af->sockaddr_len;
|
||||
|
Loading…
Reference in New Issue
Block a user