diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-06-19 03:37:31 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-06-19 03:37:31 -0400 |
| commit | d819c49da624e3ee09b2844603d58265039eecdd (patch) | |
| tree | 09a503b98769767d81337ec8e5c14c60874a4e77 /net/sctp | |
| parent | f18f982abf183e91f435990d337164c7a43d1e6d (diff) | |
| parent | 9bedbcb207ed9a571b239231d99c8fd4a34ae24d (diff) | |
Merge branch 'linus' into sched/urgent
Diffstat (limited to 'net/sctp')
| -rw-r--r-- | net/sctp/associola.c | 13 | ||||
| -rw-r--r-- | net/sctp/protocol.c | 15 |
2 files changed, 23 insertions, 5 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) | |||
| 474 | void sctp_assoc_set_primary(struct sctp_association *asoc, | 474 | void sctp_assoc_set_primary(struct sctp_association *asoc, |
| 475 | struct sctp_transport *transport) | 475 | struct sctp_transport *transport) |
| 476 | { | 476 | { |
| 477 | int changeover = 0; | ||
| 478 | |||
| 479 | /* it's a changeover only if we already have a primary path | ||
| 480 | * that we are changing | ||
| 481 | */ | ||
| 482 | if (asoc->peer.primary_path != NULL && | ||
| 483 | asoc->peer.primary_path != transport) | ||
| 484 | changeover = 1 ; | ||
| 485 | |||
| 477 | asoc->peer.primary_path = transport; | 486 | asoc->peer.primary_path = transport; |
| 478 | 487 | ||
| 479 | /* Set a default msg_name for events. */ | 488 | /* Set a default msg_name for events. */ |
| @@ -499,12 +508,12 @@ void sctp_assoc_set_primary(struct sctp_association *asoc, | |||
| 499 | * double switch to the same destination address. | 508 | * double switch to the same destination address. |
| 500 | */ | 509 | */ |
| 501 | if (transport->cacc.changeover_active) | 510 | if (transport->cacc.changeover_active) |
| 502 | transport->cacc.cycling_changeover = 1; | 511 | transport->cacc.cycling_changeover = changeover; |
| 503 | 512 | ||
| 504 | /* 2) The sender MUST set CHANGEOVER_ACTIVE to indicate that | 513 | /* 2) The sender MUST set CHANGEOVER_ACTIVE to indicate that |
| 505 | * a changeover has occurred. | 514 | * a changeover has occurred. |
| 506 | */ | 515 | */ |
| 507 | transport->cacc.changeover_active = 1; | 516 | transport->cacc.changeover_active = changeover; |
| 508 | 517 | ||
| 509 | /* 3) The sender MUST store the next TSN to be sent in | 518 | /* 3) The sender MUST store the next TSN to be sent in |
| 510 | * next_tsn_at_change. | 519 | * next_tsn_at_change. |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index b435a193c5df..9258dfe784ae 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
| @@ -108,14 +108,23 @@ static __init int sctp_proc_init(void) | |||
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | if (sctp_snmp_proc_init()) | 110 | if (sctp_snmp_proc_init()) |
| 111 | goto out_nomem; | 111 | goto out_snmp_proc_init; |
| 112 | if (sctp_eps_proc_init()) | 112 | if (sctp_eps_proc_init()) |
| 113 | goto out_nomem; | 113 | goto out_eps_proc_init; |
| 114 | if (sctp_assocs_proc_init()) | 114 | if (sctp_assocs_proc_init()) |
| 115 | goto out_nomem; | 115 | goto out_assocs_proc_init; |
| 116 | 116 | ||
| 117 | return 0; | 117 | return 0; |
| 118 | 118 | ||
| 119 | out_assocs_proc_init: | ||
| 120 | sctp_eps_proc_exit(); | ||
| 121 | out_eps_proc_init: | ||
| 122 | sctp_snmp_proc_exit(); | ||
| 123 | out_snmp_proc_init: | ||
| 124 | if (proc_net_sctp) { | ||
| 125 | proc_net_sctp = NULL; | ||
| 126 | remove_proc_entry("sctp", init_net.proc_net); | ||
| 127 | } | ||
| 119 | out_nomem: | 128 | out_nomem: |
| 120 | return -ENOMEM; | 129 | return -ENOMEM; |
| 121 | } | 130 | } |
