diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2006-11-21 02:02:40 +0100 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-12-03 06:26:26 +0100 |
commit | d5c747f6efc03495635f129c8eb1dad0200ab183 (patch) | |
tree | b7a9097f9f8508f76d30b4589b7a861c2b701457 /net/sctp | |
parent | [SCTP] bug: sctp_assoc_lookup_laddr() is broken with ipv6. (diff) | |
download | linux-d5c747f6efc03495635f129c8eb1dad0200ab183.tar.xz linux-d5c747f6efc03495635f129c8eb1dad0200ab183.zip |
[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>
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/bind_addr.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sctp/bind_addr.c b/net/sctp/bind_addr.c index 2b9c12a170e5..23b5b664a8a0 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; |