Fix a bug reported by Irene Ruengeler which resulted in not sending

out HEARTBEATs when requested by the user. The HEARTBEATs were only
queued, but not actually sent out.

MFC after: 2 months.
This commit is contained in:
Michael Tuexen 2011-12-10 10:52:54 +00:00
parent fd33ce416e
commit 972478a4c0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=228391
2 changed files with 3 additions and 0 deletions

View File

@ -391,6 +391,8 @@ __FBSDID("$FreeBSD$");
#define SCTP_OUTPUT_FROM_COOKIE_ACK 14
#define SCTP_OUTPUT_FROM_DRAIN 15
#define SCTP_OUTPUT_FROM_CLOSING 16
#define SCTP_OUTPUT_FROM_SOCKOPT 17
/* SCTP chunk types are moved sctp.h for application (NAT, FW) use */
/* align to 32-bit sizes */

View File

@ -4727,6 +4727,7 @@ sctp_setopt(struct socket *so, int optname, void *optval, size_t optsize,
if (paddrp->spp_flags & SPP_HB_DEMAND) {
/* on demand HB */
sctp_send_hb(stcb, net, SCTP_SO_LOCKED);
sctp_chunk_output(inp, stcb, SCTP_OUTPUT_FROM_SOCKOPT, SCTP_SO_LOCKED);
sctp_timer_start(SCTP_TIMER_TYPE_HEARTBEAT, inp, stcb, net);
}
if ((paddrp->spp_flags & SPP_PMTUD_DISABLE) && (paddrp->spp_pathmtu >= SCTP_SMALLEST_PMTU)) {