diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-06-23 11:30:23 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-06-23 11:30:23 +0200 |
commit | 1de8644cc7c826e0c41e52825bd5a12e2e31e6ca (patch) | |
tree | df1e884080599facaf70d2675c480e999da953e1 /net/sctp/associola.c | |
parent | 6c3df25511c2c51f2dd36cc52a8d22363d731793 (diff) | |
parent | 481c5346d0981940ee63037eb53e4e37b0735c10 (diff) |
Merge branch 'linus' into sched/develtip-sched-devel-2008-06-23_09.30_Mon
Diffstat (limited to 'net/sctp/associola.c')
-rw-r--r-- | net/sctp/associola.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 532634861db1..024c3ebd9661 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c @@ -474,6 +474,15 @@ static void sctp_association_destroy(struct sctp_association *asoc) void sctp_assoc_set_primary(struct sctp_association *asoc, struct sctp_transport *transport) { + int changeover = 0; + + /* it's a changeover only if we already have a primary path + * that we are changing + */ + if (asoc->peer.primary_path != NULL && + asoc->peer.primary_path != transport) + changeover = 1 ; + asoc->peer.primary_path = transport; /* Set a default msg_name for events. */ @@ -499,12 +508,12 @@ void sctp_assoc_set_primary(struct sctp_association *asoc, * double switch to the same destination address. */ if (transport->cacc.changeover_active) - transport->cacc.cycling_changeover = 1; + transport->cacc.cycling_changeover = changeover; /* 2) The sender MUST set CHANGEOVER_ACTIVE to indicate that * a changeover has occurred. */ - transport->cacc.changeover_active = 1; + transport->cacc.changeover_active = changeover; /* 3) The sender MUST store the next TSN to be sent in * next_tsn_at_change. |