Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19031
b: refs/heads/master
c: a7d1f1b
h: refs/heads/master
i:
  19029: 0faeeea
  19027: 19df61b
  19023: 07ae480
v: v3
  • Loading branch information
Tsutomu Fujii authored and Sridhar Samudrala committed Jan 17, 2006
1 parent c0d708f commit a18fc16
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 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: c4d2444e992c4eda1d7fc3287e93ba58295bf6b9
refs/heads/master: a7d1f1b66c05ef4ebb58a34be7caad9af15546a4
13 changes: 9 additions & 4 deletions trunk/net/sctp/input.c
Original file line number Diff line number Diff line change
Expand Up @@ -588,10 +588,16 @@ int sctp_rcv_ootb(struct sk_buff *skb)
sctp_errhdr_t *err;

ch = (sctp_chunkhdr_t *) skb->data;
ch_end = ((__u8 *) ch) + WORD_ROUND(ntohs(ch->length));

/* Scan through all the chunks in the packet. */
while (ch_end > (__u8 *)ch && ch_end < skb->tail) {
do {
/* Break out if chunk length is less then minimal. */
if (ntohs(ch->length) < sizeof(sctp_chunkhdr_t))
break;

ch_end = ((__u8 *)ch) + WORD_ROUND(ntohs(ch->length));
if (ch_end > skb->tail)
break;

/* RFC 8.4, 2) If the OOTB packet contains an ABORT chunk, the
* receiver MUST silently discard the OOTB packet and take no
Expand Down Expand Up @@ -622,8 +628,7 @@ int sctp_rcv_ootb(struct sk_buff *skb)
}

ch = (sctp_chunkhdr_t *) ch_end;
ch_end = ((__u8 *) ch) + WORD_ROUND(ntohs(ch->length));
}
} while (ch_end < skb->tail);

return 0;

Expand Down
2 changes: 2 additions & 0 deletions trunk/net/sctp/sm_statefuns.c
Original file line number Diff line number Diff line change
Expand Up @@ -3090,6 +3090,8 @@ sctp_disposition_t sctp_sf_ootb(const struct sctp_endpoint *ep,
break;

ch_end = ((__u8 *)ch) + WORD_ROUND(ntohs(ch->length));
if (ch_end > skb->tail)
break;

if (SCTP_CID_SHUTDOWN_ACK == ch->type)
ootb_shut_ack = 1;
Expand Down

0 comments on commit a18fc16

Please sign in to comment.