]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/sctp/ipv6.c
Merge branch 'upstream' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wirel...
[linux-2.6-omap-h63xx.git] / net / sctp / ipv6.c
index 8ef08070c8b679b4702b922181b0186691335bfd..99c0cefc04e072ff49b1b794777d7cb904a6cd95 100644 (file)
@@ -290,7 +290,8 @@ static void sctp_v6_get_saddr(struct sctp_association *asoc,
        sctp_read_lock(addr_lock);
        list_for_each(pos, &bp->address_list) {
                laddr = list_entry(pos, struct sctp_sockaddr_entry, list);
-               if ((laddr->a.sa.sa_family == AF_INET6) &&
+               if ((laddr->use_as_src) &&
+                   (laddr->a.sa.sa_family == AF_INET6) &&
                    (scope <= sctp_scope(&laddr->a))) {
                        bmatchlen = sctp_v6_addr_match_len(daddr, &laddr->a);
                        if (!baddr || (matchlen < bmatchlen)) {