diff options
author | Tony Luck <tony.luck@intel.com> | 2005-05-17 18:53:14 -0400 |
---|---|---|
committer | Tony Luck <tony.luck@intel.com> | 2005-05-17 18:53:14 -0400 |
commit | 325a479c4c110db278ef3361460a48c4093252cc (patch) | |
tree | bcfbf4d0647d9442045639a5c19da59d55190e81 /include/net/sctp | |
parent | ebcc80c1b6629a445f7471cc1ddb48faf8a84e70 (diff) | |
parent | 7f9eaedf894dbaa08c157832e9a6c9c03ffed1ed (diff) |
Merge with temp tree to get David's gdb inferior calls patch
Diffstat (limited to 'include/net/sctp')
-rw-r--r-- | include/net/sctp/sm.h | 42 | ||||
-rw-r--r-- | include/net/sctp/structs.h | 11 |
2 files changed, 34 insertions, 19 deletions
diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h index 5576db56324d..f4fcee104707 100644 --- a/include/net/sctp/sm.h +++ b/include/net/sctp/sm.h | |||
@@ -407,32 +407,38 @@ sctp_vtag_verify(const struct sctp_chunk *chunk, | |||
407 | return 0; | 407 | return 0; |
408 | } | 408 | } |
409 | 409 | ||
410 | /* Check VTAG of the packet matches the sender's own tag OR its peer's | 410 | /* Check VTAG of the packet matches the sender's own tag and the T bit is |
411 | * tag and the T bit is set in the Chunk Flags. | 411 | * not set, OR its peer's tag and the T bit is set in the Chunk Flags. |
412 | */ | 412 | */ |
413 | static inline int | 413 | static inline int |
414 | sctp_vtag_verify_either(const struct sctp_chunk *chunk, | 414 | sctp_vtag_verify_either(const struct sctp_chunk *chunk, |
415 | const struct sctp_association *asoc) | 415 | const struct sctp_association *asoc) |
416 | { | 416 | { |
417 | /* RFC 2960 Section 8.5.1, sctpimpguide-06 Section 2.13.2 | 417 | /* RFC 2960 Section 8.5.1, sctpimpguide Section 2.41 |
418 | * | 418 | * |
419 | * B) The receiver of a ABORT shall accept the packet if the | 419 | * B) The receiver of a ABORT MUST accept the packet |
420 | * Verification Tag field of the packet matches its own tag OR it | 420 | * if the Verification Tag field of the packet matches its own tag |
421 | * is set to its peer's tag and the T bit is set in the Chunk | 421 | * and the T bit is not set |
422 | * Flags. Otherwise, the receiver MUST silently discard the packet | 422 | * OR |
423 | * and take no further action. | 423 | * it is set to its peer's tag and the T bit is set in the Chunk |
424 | * | 424 | * Flags. |
425 | * (C) The receiver of a SHUTDOWN COMPLETE shall accept the | 425 | * Otherwise, the receiver MUST silently discard the packet |
426 | * packet if the Verification Tag field of the packet | 426 | * and take no further action. |
427 | * matches its own tag OR it is set to its peer's tag and | ||
428 | * the T bit is set in the Chunk Flags. Otherwise, the | ||
429 | * receiver MUST silently discard the packet and take no | ||
430 | * further action.... | ||
431 | * | 427 | * |
428 | * C) The receiver of a SHUTDOWN COMPLETE shall accept the packet | ||
429 | * if the Verification Tag field of the packet matches its own tag | ||
430 | * and the T bit is not set | ||
431 | * OR | ||
432 | * it is set to its peer's tag and the T bit is set in the Chunk | ||
433 | * Flags. | ||
434 | * Otherwise, the receiver MUST silently discard the packet | ||
435 | * and take no further action. An endpoint MUST ignore the | ||
436 | * SHUTDOWN COMPLETE if it is not in the SHUTDOWN-ACK-SENT state. | ||
432 | */ | 437 | */ |
433 | if ((ntohl(chunk->sctp_hdr->vtag) == asoc->c.my_vtag) || | 438 | if ((!sctp_test_T_bit(chunk) && |
434 | (sctp_test_T_bit(chunk) && (ntohl(chunk->sctp_hdr->vtag) | 439 | (ntohl(chunk->sctp_hdr->vtag) == asoc->c.my_vtag)) || |
435 | == asoc->c.peer_vtag))) { | 440 | (sctp_test_T_bit(chunk) && |
441 | (ntohl(chunk->sctp_hdr->vtag) == asoc->c.peer_vtag))) { | ||
436 | return 1; | 442 | return 1; |
437 | } | 443 | } |
438 | 444 | ||
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h index 7e64cf6bda1e..6c24d9cd3d66 100644 --- a/include/net/sctp/structs.h +++ b/include/net/sctp/structs.h | |||
@@ -154,6 +154,13 @@ extern struct sctp_globals { | |||
154 | int max_retrans_path; | 154 | int max_retrans_path; |
155 | int max_retrans_init; | 155 | int max_retrans_init; |
156 | 156 | ||
157 | /* | ||
158 | * Policy for preforming sctp/socket accounting | ||
159 | * 0 - do socket level accounting, all assocs share sk_sndbuf | ||
160 | * 1 - do sctp accounting, each asoc may use sk_sndbuf bytes | ||
161 | */ | ||
162 | int sndbuf_policy; | ||
163 | |||
157 | /* HB.interval - 30 seconds */ | 164 | /* HB.interval - 30 seconds */ |
158 | int hb_interval; | 165 | int hb_interval; |
159 | 166 | ||
@@ -207,6 +214,7 @@ extern struct sctp_globals { | |||
207 | #define sctp_valid_cookie_life (sctp_globals.valid_cookie_life) | 214 | #define sctp_valid_cookie_life (sctp_globals.valid_cookie_life) |
208 | #define sctp_cookie_preserve_enable (sctp_globals.cookie_preserve_enable) | 215 | #define sctp_cookie_preserve_enable (sctp_globals.cookie_preserve_enable) |
209 | #define sctp_max_retrans_association (sctp_globals.max_retrans_association) | 216 | #define sctp_max_retrans_association (sctp_globals.max_retrans_association) |
217 | #define sctp_sndbuf_policy (sctp_globals.sndbuf_policy) | ||
210 | #define sctp_max_retrans_path (sctp_globals.max_retrans_path) | 218 | #define sctp_max_retrans_path (sctp_globals.max_retrans_path) |
211 | #define sctp_max_retrans_init (sctp_globals.max_retrans_init) | 219 | #define sctp_max_retrans_init (sctp_globals.max_retrans_init) |
212 | #define sctp_hb_interval (sctp_globals.hb_interval) | 220 | #define sctp_hb_interval (sctp_globals.hb_interval) |
@@ -1212,7 +1220,8 @@ struct sctp_endpoint { | |||
1212 | /* Default timeouts. */ | 1220 | /* Default timeouts. */ |
1213 | int timeouts[SCTP_NUM_TIMEOUT_TYPES]; | 1221 | int timeouts[SCTP_NUM_TIMEOUT_TYPES]; |
1214 | 1222 | ||
1215 | /* Various thresholds. */ | 1223 | /* sendbuf acct. policy. */ |
1224 | __u32 sndbuf_policy; | ||
1216 | 1225 | ||
1217 | /* Name for debugging output... */ | 1226 | /* Name for debugging output... */ |
1218 | char *debug_name; | 1227 | char *debug_name; |