diff options
author | rrs <rrs@FreeBSD.org> | 2007-06-17 01:36:02 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2007-06-17 01:36:02 +0000 |
commit | a50eb788faabaf4a93e82cc35cc09d3db96c9539 (patch) | |
tree | 4021851b081dca4e0a547aaf328fad5ba03e3112 /sys/netinet/sctp_output.c | |
parent | 6a4276ae14305505c7daf6c5c38cf89b26e623a6 (diff) | |
download | FreeBSD-src-a50eb788faabaf4a93e82cc35cc09d3db96c9539.zip FreeBSD-src-a50eb788faabaf4a93e82cc35cc09d3db96c9539.tar.gz |
- For sctp_input/sctp6_input add announcment when a packet arrives (debug)
- re-factor the packet drop in sctp_output a bit more, we don't need the
trim after all, but the size calc is now corrected.
- When a assoc is in the COOKIE-ECHO/COOKIE-WAIT state and the user
closes, it should not matter if data is queued, the assoc should be
purged.
- In error leg a missing free_chunk when iph comes in NULL (should not
happen but just in case).
Diffstat (limited to 'sys/netinet/sctp_output.c')
-rw-r--r-- | sys/netinet/sctp_output.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index cb8b93f..430f853 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -9653,7 +9653,7 @@ sctp_send_packet_dropped(struct sctp_tcb *stcb, struct sctp_nets *net, int len; int was_trunc = 0; struct ip *iph; - int fullsz = 0, trimby = 0; + int fullsz = 0, extra = 0; long spc; asoc = &stcb->asoc; @@ -9674,6 +9674,7 @@ sctp_send_packet_dropped(struct sctp_tcb *stcb, struct sctp_nets *net, chk->copy_by_ref = 0; iph = mtod(m, struct ip *); if (iph == NULL) { + sctp_free_a_chunk(stcb, chk); return; } if (iph->ip_v == IPVERSION) { @@ -9691,10 +9692,8 @@ sctp_send_packet_dropped(struct sctp_tcb *stcb, struct sctp_nets *net, /* * only send 1 mtu worth, trim off the excess on the end. */ - fullsz = len + SCTP_MAX_OVERHEAD; + fullsz = len - extra; len = min(stcb->asoc.smallest_mtu, MCLBYTES) - SCTP_MAX_OVERHEAD; - trimby = len - fullsz; - m_adj(m, trimby); was_trunc = 1; } chk->asoc = &stcb->asoc; |