summaryrefslogtreecommitdiff
path: root/net/sctp/protocol.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-07-21 23:44:45 (GMT)
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-21 23:44:45 (GMT)
commit12157a8d78af50842774bedb80b7b84a87f60951 (patch)
tree7e1c3ec5eb07b212cc6f6b4663ae6dff1ae78eb9 /net/sctp/protocol.c
parentefab4cbe99f9b73d208ad9e5ec9388524005e095 (diff)
parent9df3f3d28bca0157e2bab2f3171d2ad4f0930634 (diff)
downloadlinux-12157a8d78af50842774bedb80b7b84a87f60951.tar.xz
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (21 commits) [TIPC]: Removing useless casts [IPV4]: Fix nexthop realm dumping for multipath routes [DUMMY]: Avoid an oops when dummy_init_one() failed [IFB] After ifb_init_one() failed, i is increased. Decrease [NET]: Fix reversed error test in netif_tx_trylock [MAINTAINERS]: Mark LAPB as Oprhan. [NET]: Conversions from kmalloc+memset to k(z|c)alloc. [NET]: sun happymeal, little pci cleanup [IrDA]: Use alloc_skb() in IrDA TX path [I/OAT]: Remove pci_module_init() from Intel I/OAT DMA engine [I/OAT]: net/core/user_dma.c should #include <net/netdma.h> [SCTP]: ADDIP: Don't use an address as source until it is ASCONF-ACKed [SCTP]: Set chunk->data_accepted only if we are going to accept it. [SCTP]: Verify all the paths to a peer via heartbeat before using them. [SCTP]: Unhash the endpoint in sctp_endpoint_free(). [SCTP]: Check for NULL arg to sctp_bucket_destroy(). [PKT_SCHED] netem: Fix slab corruption with netem (2nd try) [WAN]: Converted synclink drivers to use netif_carrier_*() [WAN]: Cosmetic changes to N2 and C101 drivers [WAN]: Added missing netif_dormant_off() to generic HDLC ...
Diffstat (limited to 'net/sctp/protocol.c')
-rw-r--r--net/sctp/protocol.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c
index 816c033..1ab03a2 100644
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -240,7 +240,7 @@ int sctp_copy_local_addr_list(struct sctp_bind_addr *bp, sctp_scope_t scope,
(((AF_INET6 == addr->a.sa.sa_family) &&
(copy_flags & SCTP_ADDR6_ALLOWED) &&
(copy_flags & SCTP_ADDR6_PEERSUPP)))) {
- error = sctp_add_bind_addr(bp, &addr->a,
+ error = sctp_add_bind_addr(bp, &addr->a, 1,
GFP_ATOMIC);
if (error)
goto end_copy;
@@ -486,6 +486,8 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
list_for_each(pos, &bp->address_list) {
laddr = list_entry(pos, struct sctp_sockaddr_entry,
list);
+ if (!laddr->use_as_src)
+ continue;
sctp_v4_dst_saddr(&dst_saddr, dst, bp->port);
if (sctp_v4_cmp_addr(&dst_saddr, &laddr->a))
goto out_unlock;
@@ -506,7 +508,8 @@ static struct dst_entry *sctp_v4_get_dst(struct sctp_association *asoc,
list_for_each(pos, &bp->address_list) {
laddr = list_entry(pos, struct sctp_sockaddr_entry, list);
- if (AF_INET == laddr->a.sa.sa_family) {
+ if ((laddr->use_as_src) &&
+ (AF_INET == laddr->a.sa.sa_family)) {
fl.fl4_src = laddr->a.v4.sin_addr.s_addr;
if (!ip_route_output_key(&rt, &fl)) {
dst = &rt->u.dst;