diff options
author | rrs <rrs@FreeBSD.org> | 2007-07-02 19:22:22 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2007-07-02 19:22:22 +0000 |
commit | a400d04306bce1d90fa1fb76eb5ed9c3977a1c32 (patch) | |
tree | 1af5bea59680545d915388b260052ee36e2b1ab6 /sys/netinet/sctputil.c | |
parent | bb6f1c3d9ba9c5a3452440ffdafda555b482e1b2 (diff) | |
download | FreeBSD-src-a400d04306bce1d90fa1fb76eb5ed9c3977a1c32.zip FreeBSD-src-a400d04306bce1d90fa1fb76eb5ed9c3977a1c32.tar.gz |
- Consolidate the code that free's chunks to actually also
call the sctp_free_remote_address() function.
- Assure that when we allocate a chunk the whoTo is NULL,
also when we free it and place it into the cache we NULL
it (that way the consolidation code will always work).
- Fix a small race, when a empty data holder is left on the stream
out queue, and both sides do a shutdown, the empty data holder
would prevent us from sending a SHUTDOWN-ACK and at the same time we
never would cleanup the empty holder (since nothing was ever in queue).
We now add a utility function that a) cleans up empty holders and
b) properly determines if there are still pending data chunks on
the stream out wheel.
Approved by: re@freebsd.org (Ken Smith)
Diffstat (limited to 'sys/netinet/sctputil.c')
-rw-r--r-- | sys/netinet/sctputil.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/sys/netinet/sctputil.c b/sys/netinet/sctputil.c index f68f2d5..319bbcc 100644 --- a/sys/netinet/sctputil.c +++ b/sys/netinet/sctputil.c @@ -3450,9 +3450,6 @@ sctp_report_all_outbound(struct sctp_tcb *stcb, int holds_lock) sctp_m_freem(chk->data); chk->data = NULL; } - if (chk->whoTo) - sctp_free_remote_addr(chk->whoTo); - chk->whoTo = NULL; sctp_free_a_chunk(stcb, chk); /* sa_ignore FREED_MEMORY */ chk = TAILQ_FIRST(&asoc->sent_queue); @@ -3481,9 +3478,6 @@ sctp_report_all_outbound(struct sctp_tcb *stcb, int holds_lock) sctp_m_freem(chk->data); chk->data = NULL; } - if (chk->whoTo) - sctp_free_remote_addr(chk->whoTo); - chk->whoTo = NULL; sctp_free_a_chunk(stcb, chk); /* sa_ignore FREED_MEMORY */ chk = TAILQ_FIRST(&asoc->send_queue); |