提交 d5c747f6 编写于 作者: A Al Viro 提交者: David S. Miller

[SCTP] bug: sctp_find_unmatch_addr() compares net-endian to host-endian

Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 39940a48
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册