Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98221
b: refs/heads/master
c: 319fa2a
h: refs/heads/master
i:
  98219: f02426e
v: v3
  • Loading branch information
Vlad Yasevich authored and David S. Miller committed Jun 17, 2008
1 parent e2b2031 commit fa1c81c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 80896a3584bbff9ff9ad4dde735517c4de68d736
refs/heads/master: 319fa2a24f652dc35e613360c4532b8d2a771add
13 changes: 11 additions & 2 deletions trunk/net/sctp/associola.c
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand All @@ -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.
Expand Down

0 comments on commit fa1c81c

Please sign in to comment.