diff options
author | David S. Miller <davem@davemloft.net> | 2008-06-16 21:25:48 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-06-16 21:25:48 -0400 |
commit | caea902f72b053fd0c76d0d3b6b2e057beb3fc64 (patch) | |
tree | 74e8d476b2c51480420e2ef7c9bbae249b6edbc9 /net/sctp | |
parent | 0b4419162aa6c4204843f3a13b48d9ab821d3167 (diff) | |
parent | 65c3e4715b1b934f8dcc002d9f46b4371ca7a9b1 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/rt2x00/Kconfig
drivers/net/wireless/rt2x00/rt2x00usb.c
net/sctp/protocol.c
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/associola.c | 13 | ||||
-rw-r--r-- | net/sctp/protocol.c | 19 |
2 files changed, 26 insertions, 6 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index d5cc731b6798..35b6a023a6d0 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -476,6 +476,15 @@ static void sctp_association_destroy(struct sctp_association *asoc) | |||
476 | void sctp_assoc_set_primary(struct sctp_association *asoc, | 476 | void sctp_assoc_set_primary(struct sctp_association *asoc, |
477 | struct sctp_transport *transport) | 477 | struct sctp_transport *transport) |
478 | { | 478 | { |
479 | int changeover = 0; | ||
480 | |||
481 | /* it's a changeover only if we already have a primary path | ||
482 | * that we are changing | ||
483 | */ | ||
484 | if (asoc->peer.primary_path != NULL && | ||
485 | asoc->peer.primary_path != transport) | ||
486 | changeover = 1 ; | ||
487 | |||
479 | asoc->peer.primary_path = transport; | 488 | asoc->peer.primary_path = transport; |
480 | 489 | ||
481 | /* Set a default msg_name for events. */ | 490 | /* Set a default msg_name for events. */ |
@@ -501,12 +510,12 @@ void sctp_assoc_set_primary(struct sctp_association *asoc, | |||
501 | * double switch to the same destination address. | 510 | * double switch to the same destination address. |
502 | */ | 511 | */ |
503 | if (transport->cacc.changeover_active) | 512 | if (transport->cacc.changeover_active) |
504 | transport->cacc.cycling_changeover = 1; | 513 | transport->cacc.cycling_changeover = changeover; |
505 | 514 | ||
506 | /* 2) The sender MUST set CHANGEOVER_ACTIVE to indicate that | 515 | /* 2) The sender MUST set CHANGEOVER_ACTIVE to indicate that |
507 | * a changeover has occurred. | 516 | * a changeover has occurred. |
508 | */ | 517 | */ |
509 | transport->cacc.changeover_active = 1; | 518 | transport->cacc.changeover_active = changeover; |
510 | 519 | ||
511 | /* 3) The sender MUST store the next TSN to be sent in | 520 | /* 3) The sender MUST store the next TSN to be sent in |
512 | * next_tsn_at_change. | 521 | * next_tsn_at_change. |
diff --git a/net/sctp/protocol.c b/net/sctp/protocol.c index d6af466091d2..23aaffb97ca3 100644 --- a/net/sctp/protocol.c +++ b/net/sctp/protocol.c | |||
@@ -108,16 +108,27 @@ 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 | if (sctp_remaddr_proc_init()) | 116 | if (sctp_remaddr_proc_init()) |
117 | goto out_nomem; | 117 | goto out_remaddr_proc_init; |
118 | 118 | ||
119 | return 0; | 119 | return 0; |
120 | 120 | ||
121 | out_remaddr_proc_init: | ||
122 | sctp_remaddr_proc_exit(); | ||
123 | out_assocs_proc_init: | ||
124 | sctp_eps_proc_exit(); | ||
125 | out_eps_proc_init: | ||
126 | sctp_snmp_proc_exit(); | ||
127 | out_snmp_proc_init: | ||
128 | if (proc_net_sctp) { | ||
129 | proc_net_sctp = NULL; | ||
130 | remove_proc_entry("sctp", init_net.proc_net); | ||
131 | } | ||
121 | out_nomem: | 132 | out_nomem: |
122 | return -ENOMEM; | 133 | return -ENOMEM; |
123 | } | 134 | } |