Date: Wed, 16 Sep 2009 14:23:32 +0000 (UTC) From: Michael Tuexen <tuexen@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r197257 - head/sys/netinet Message-ID: <200909161423.n8GENWNq027464@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Wed Sep 16 14:23:31 2009 New Revision: 197257 URL: http://svn.freebsd.org/changeset/base/197257 Log: Fix a bug reported by Daniel Mentz: When authenticating DATA chunks some DATA chunks might get stuck when the MTU gets decreased via an ICMP message. Approved by: rrs (mentor) MFC after: immediately Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Wed Sep 16 13:44:12 2009 (r197256) +++ head/sys/netinet/sctp_usrreq.c Wed Sep 16 14:23:31 2009 (r197257) @@ -106,6 +106,7 @@ sctp_pathmtu_adjustment(struct sctp_inpc uint16_t nxtsz) { struct sctp_tmit_chunk *chk; + uint16_t overhead; /* Adjust that too */ stcb->asoc.smallest_mtu = nxtsz; @@ -114,13 +115,17 @@ sctp_pathmtu_adjustment(struct sctp_inpc SCTP_PRINTF("sctp_pathmtu_adjust called inp:%p stcb:%p net:%p nxtsz:%d\n", inp, stcb, net, nxtsz); #endif + overhead = IP_HDR_SIZE; + if (sctp_auth_is_required_chunk(SCTP_DATA, stcb->asoc.peer_auth_chunks)) { + overhead += sctp_get_auth_chunk_len(stcb->asoc.peer_hmac_id); + } TAILQ_FOREACH(chk, &stcb->asoc.send_queue, sctp_next) { - if ((chk->send_size + IP_HDR_SIZE) > nxtsz) { + if ((chk->send_size + overhead) > nxtsz) { chk->flags |= CHUNK_FLAGS_FRAGMENT_OK; } } TAILQ_FOREACH(chk, &stcb->asoc.sent_queue, sctp_next) { - if ((chk->send_size + IP_HDR_SIZE) > nxtsz) { + if ((chk->send_size + overhead) > nxtsz) { /* * For this guy we also mark for immediate resend * since we sent to big of chunk
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909161423.n8GENWNq027464>