Date: Fri, 17 May 2013 21:45:53 +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: r250754 - head/sys/netinet Message-ID: <201305172145.r4HLjrvV036442@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tuexen Date: Fri May 17 21:45:52 2013 New Revision: 250754 URL: http://svnweb.freebsd.org/changeset/base/250754 Log: Don't send an ABORT chunk with verification 0. MFC after: 1 week Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Fri May 17 20:53:15 2013 (r250753) +++ head/sys/netinet/sctp_output.c Fri May 17 21:45:52 2013 (r250754) @@ -10669,6 +10669,7 @@ sctp_send_abort_tcb(struct sctp_tcb *stc struct sctp_abort_chunk *abort; struct sctp_auth_chunk *auth = NULL; struct sctp_nets *net; + uint32_t vtag; uint32_t auth_offset = 0; uint16_t cause_len, chunk_len, padding_len; @@ -10724,7 +10725,14 @@ sctp_send_abort_tcb(struct sctp_tcb *stc /* Fill in the ABORT chunk header. */ abort = mtod(m_abort, struct sctp_abort_chunk *); abort->ch.chunk_type = SCTP_ABORT_ASSOCIATION; - abort->ch.chunk_flags = 0; + if (stcb->asoc.peer_vtag == 0) { + /* This happens iff the assoc is in COOKIE-WAIT state. */ + vtag = stcb->asoc.my_vtag; + abort->ch.chunk_flags = SCTP_HAD_NO_TCB; + } else { + vtag = stcb->asoc.peer_vtag; + abort->ch.chunk_flags = 0; + } abort->ch.chunk_length = htons(chunk_len); /* Add padding, if necessary. */ if (padding_len > 0) { @@ -10736,7 +10744,7 @@ sctp_send_abort_tcb(struct sctp_tcb *stc (void)sctp_lowlevel_chunk_output(stcb->sctp_ep, stcb, net, (struct sockaddr *)&net->ro._l_addr, m_out, auth_offset, auth, stcb->asoc.authinfo.active_keyid, 1, 0, 0, - stcb->sctp_ep->sctp_lport, stcb->rport, htonl(stcb->asoc.peer_vtag), + stcb->sctp_ep->sctp_lport, stcb->rport, htonl(vtag), stcb->asoc.primary_destination->port, NULL, 0, 0, so_locked);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305172145.r4HLjrvV036442>