sctp: Set source addresses on the association before adding transports
authorVlad Yasevich <vladislav.yasevich@hp.com>
Tue, 10 Nov 2009 08:57:34 +0000 (08:57 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Nov 2009 03:56:50 +0000 (19:56 -0800)
commit409b95aff3583c05ac7a9247fa3d8c9aa7f9cae3
treea8cd8135f974b8f1c6ef9d092755e1ac5b190b2f
parentd792c1006fe92448217b71513d3955868358271d
sctp: Set source addresses on the association before adding transports

Recent commit 8da645e101a8c20c6073efda3c7cc74eec01b87f
sctp: Get rid of an extra routing lookup when adding a transport
introduced a regression in the connection setup.  The behavior was

different between IPv4 and IPv6.  IPv4 case ended up working because the
route lookup routing returned a NULL route, which triggered another
route lookup later in the output patch that succeeded.  In the IPv6 case,
a valid route was returned for first call, but we could not find a valid
source address at the time since the source addresses were not set on the
association yet.  Thus resulted in a hung connection.

The solution is to set the source addresses on the association prior to
adding peers.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sctp/structs.h
net/sctp/associola.c
net/sctp/sm_statefuns.c
net/sctp/socket.c