svn commit: r216821 - head/sys/netinet
Michael Tuexen
tuexen at FreeBSD.org
Thu Dec 30 16:23:14 UTC 2010
Author: tuexen
Date: Thu Dec 30 16:23:13 2010
New Revision: 216821
URL: http://svn.freebsd.org/changeset/base/216821
Log:
Fix three bugs related to the sequence number wrap-around affecting
the processing of ECNE and ASCONF chunks.
Reviewed by: rrs
MFC after: 3 days.
Modified:
head/sys/netinet/sctp_asconf.c
head/sys/netinet/sctp_input.c
head/sys/netinet/sctp_output.c
Modified: head/sys/netinet/sctp_asconf.c
==============================================================================
--- head/sys/netinet/sctp_asconf.c Thu Dec 30 15:58:23 2010 (r216820)
+++ head/sys/netinet/sctp_asconf.c Thu Dec 30 16:23:13 2010 (r216821)
@@ -632,7 +632,7 @@ sctp_handle_asconf(struct mbuf *m, unsig
asoc = &stcb->asoc;
serial_num = ntohl(cp->serial_number);
- if (compare_with_wrap(asoc->asconf_seq_in, serial_num, MAX_SEQ) ||
+ if (compare_with_wrap(asoc->asconf_seq_in, serial_num, MAX_TSN) ||
serial_num == asoc->asconf_seq_in) {
/* got a duplicate ASCONF */
SCTPDBG(SCTP_DEBUG_ASCONF1,
Modified: head/sys/netinet/sctp_input.c
==============================================================================
--- head/sys/netinet/sctp_input.c Thu Dec 30 15:58:23 2010 (r216820)
+++ head/sys/netinet/sctp_input.c Thu Dec 30 16:23:13 2010 (r216821)
@@ -2944,7 +2944,7 @@ sctp_handle_ecn_echo(struct sctp_ecne_ch
net = lchk->whoTo;
break;
}
- if (compare_with_wrap(lchk->rec.data.TSN_seq, tsn, MAX_SEQ))
+ if (compare_with_wrap(lchk->rec.data.TSN_seq, tsn, MAX_TSN))
break;
lchk = TAILQ_NEXT(lchk, sctp_next);
}
Modified: head/sys/netinet/sctp_output.c
==============================================================================
--- head/sys/netinet/sctp_output.c Thu Dec 30 15:58:23 2010 (r216820)
+++ head/sys/netinet/sctp_output.c Thu Dec 30 16:23:13 2010 (r216821)
@@ -6477,7 +6477,7 @@ sctp_toss_old_asconf(struct sctp_tcb *st
if (chk->rec.chunk_id.id == SCTP_ASCONF) {
if (chk->data) {
acp = mtod(chk->data, struct sctp_asconf_chunk *);
- if (compare_with_wrap(ntohl(acp->serial_number), stcb->asoc.asconf_seq_out_acked, MAX_SEQ)) {
+ if (compare_with_wrap(ntohl(acp->serial_number), stcb->asoc.asconf_seq_out_acked, MAX_TSN)) {
/* Not Acked yet */
break;
}
More information about the svn-src-all
mailing list