From: Al Viro Date: Tue, 21 Nov 2006 01:02:40 +0000 (-0800) Subject: [SCTP] bug: sctp_find_unmatch_addr() compares net-endian to host-endian X-Git-Tag: v3.12-rc1~31383^2~47^2~331 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d5c747f6efc03495635f129c8eb1dad0200ab183;p=kernel%2Fkernel-generic.git [SCTP] bug: sctp_find_unmatch_addr() compares net-endian to host-endian Signed-off-by: Al Viro Signed-off-by: David S. Miller --- diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c index 2b9c12a..23b5b66 100644 --- a/net/sctp/bind_addr.c +++ b/net/sctp/bind_addr.c @@ -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;