diff options
Diffstat (limited to 'net/sctp/sm_statefuns.c')
-rw-r--r-- | net/sctp/sm_statefuns.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index c136d991da6d..27cc444aaf11 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -2158,7 +2158,7 @@ static sctp_disposition_t sctp_sf_do_5_2_6_stale(const struct sctp_endpoint *ep, | |||
2158 | * to give ample time to retransmit the new cookie and thus | 2158 | * to give ample time to retransmit the new cookie and thus |
2159 | * yield a higher probability of success on the reattempt. | 2159 | * yield a higher probability of success on the reattempt. |
2160 | */ | 2160 | */ |
2161 | stale = ntohl(*(suseconds_t *)((u8 *)err + sizeof(sctp_errhdr_t))); | 2161 | stale = ntohl(*(__be32 *)((u8 *)err + sizeof(sctp_errhdr_t))); |
2162 | stale = (stale * 2) / 1000; | 2162 | stale = (stale * 2) / 1000; |
2163 | 2163 | ||
2164 | bht.param_hdr.type = SCTP_PARAM_COOKIE_PRESERVATIVE; | 2164 | bht.param_hdr.type = SCTP_PARAM_COOKIE_PRESERVATIVE; |
@@ -2545,6 +2545,7 @@ sctp_disposition_t sctp_sf_do_ecn_cwr(const struct sctp_endpoint *ep, | |||
2545 | { | 2545 | { |
2546 | sctp_cwrhdr_t *cwr; | 2546 | sctp_cwrhdr_t *cwr; |
2547 | struct sctp_chunk *chunk = arg; | 2547 | struct sctp_chunk *chunk = arg; |
2548 | u32 lowest_tsn; | ||
2548 | 2549 | ||
2549 | if (!sctp_vtag_verify(chunk, asoc)) | 2550 | if (!sctp_vtag_verify(chunk, asoc)) |
2550 | return sctp_sf_pdiscard(ep, asoc, type, arg, commands); | 2551 | return sctp_sf_pdiscard(ep, asoc, type, arg, commands); |
@@ -2556,14 +2557,14 @@ sctp_disposition_t sctp_sf_do_ecn_cwr(const struct sctp_endpoint *ep, | |||
2556 | cwr = (sctp_cwrhdr_t *) chunk->skb->data; | 2557 | cwr = (sctp_cwrhdr_t *) chunk->skb->data; |
2557 | skb_pull(chunk->skb, sizeof(sctp_cwrhdr_t)); | 2558 | skb_pull(chunk->skb, sizeof(sctp_cwrhdr_t)); |
2558 | 2559 | ||
2559 | cwr->lowest_tsn = ntohl(cwr->lowest_tsn); | 2560 | lowest_tsn = ntohl(cwr->lowest_tsn); |
2560 | 2561 | ||
2561 | /* Does this CWR ack the last sent congestion notification? */ | 2562 | /* Does this CWR ack the last sent congestion notification? */ |
2562 | if (TSN_lte(asoc->last_ecne_tsn, cwr->lowest_tsn)) { | 2563 | if (TSN_lte(asoc->last_ecne_tsn, lowest_tsn)) { |
2563 | /* Stop sending ECNE. */ | 2564 | /* Stop sending ECNE. */ |
2564 | sctp_add_cmd_sf(commands, | 2565 | sctp_add_cmd_sf(commands, |
2565 | SCTP_CMD_ECN_CWR, | 2566 | SCTP_CMD_ECN_CWR, |
2566 | SCTP_U32(cwr->lowest_tsn)); | 2567 | SCTP_U32(lowest_tsn)); |
2567 | } | 2568 | } |
2568 | return SCTP_DISPOSITION_CONSUME; | 2569 | return SCTP_DISPOSITION_CONSUME; |
2569 | } | 2570 | } |