Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 41850
b: refs/heads/master
c: 34bcca2
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro authored and David S. Miller committed Dec 3, 2006
1 parent fbe130d commit 4158eaa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 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: 2178eda82616566b7397791afa6e5487990bac8e
refs/heads/master: 34bcca28335977e969338c98c6c43a1e08f592b2
2 changes: 1 addition & 1 deletion trunk/net/sctp/outqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,7 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_sackhdr *sack)
* A) Initialize the cacc_saw_newack to 0 for all destination
* addresses.
*/
if (sack->num_gap_ack_blocks > 0 &&
if (sack->num_gap_ack_blocks &&
primary->cacc.changeover_active) {
list_for_each(pos, transport_list) {
transport = list_entry(pos, struct sctp_transport,
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/sctp/sm_make_chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1472,10 +1472,10 @@ struct sctp_association *sctp_unpack_cookie(
suseconds_t usecs = (tv.tv_sec -
bear_cookie->expiration.tv_sec) * 1000000L +
tv.tv_usec - bear_cookie->expiration.tv_usec;
__be32 n = htonl(usecs);

usecs = htonl(usecs);
sctp_init_cause(*errp, SCTP_ERROR_STALE_COOKIE,
&usecs, sizeof(usecs));
&n, sizeof(n));
*error = -SCTP_IERROR_STALE_COOKIE;
} else
*error = -SCTP_IERROR_NOMEM;
Expand Down
9 changes: 5 additions & 4 deletions trunk/net/sctp/sm_statefuns.c
Original file line number Diff line number Diff line change
Expand Up @@ -2158,7 +2158,7 @@ static sctp_disposition_t sctp_sf_do_5_2_6_stale(const struct sctp_endpoint *ep,
* to give ample time to retransmit the new cookie and thus
* yield a higher probability of success on the reattempt.
*/
stale = ntohl(*(suseconds_t *)((u8 *)err + sizeof(sctp_errhdr_t)));
stale = ntohl(*(__be32 *)((u8 *)err + sizeof(sctp_errhdr_t)));
stale = (stale * 2) / 1000;

bht.param_hdr.type = SCTP_PARAM_COOKIE_PRESERVATIVE;
Expand Down Expand Up @@ -2545,6 +2545,7 @@ sctp_disposition_t sctp_sf_do_ecn_cwr(const struct sctp_endpoint *ep,
{
sctp_cwrhdr_t *cwr;
struct sctp_chunk *chunk = arg;
u32 lowest_tsn;

if (!sctp_vtag_verify(chunk, asoc))
return sctp_sf_pdiscard(ep, asoc, type, arg, commands);
Expand All @@ -2556,14 +2557,14 @@ sctp_disposition_t sctp_sf_do_ecn_cwr(const struct sctp_endpoint *ep,
cwr = (sctp_cwrhdr_t *) chunk->skb->data;
skb_pull(chunk->skb, sizeof(sctp_cwrhdr_t));

cwr->lowest_tsn = ntohl(cwr->lowest_tsn);
lowest_tsn = ntohl(cwr->lowest_tsn);

/* Does this CWR ack the last sent congestion notification? */
if (TSN_lte(asoc->last_ecne_tsn, cwr->lowest_tsn)) {
if (TSN_lte(asoc->last_ecne_tsn, lowest_tsn)) {
/* Stop sending ECNE. */
sctp_add_cmd_sf(commands,
SCTP_CMD_ECN_CWR,
SCTP_U32(cwr->lowest_tsn));
SCTP_U32(lowest_tsn));
}
return SCTP_DISPOSITION_CONSUME;
}
Expand Down

0 comments on commit 4158eaa

Please sign in to comment.