diff options
author | rrs <rrs@FreeBSD.org> | 2007-04-14 09:44:09 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2007-04-14 09:44:09 +0000 |
commit | fb6f6fd9a183da8573afa302e42cdf7684785a7d (patch) | |
tree | 083a217af386adf4fcec65b47183061eed4b0685 /sys/netinet6 | |
parent | 571c5243e40d0546bb093ffb58ebf6e6476cfaba (diff) | |
download | FreeBSD-src-fb6f6fd9a183da8573afa302e42cdf7684785a7d.zip FreeBSD-src-fb6f6fd9a183da8573afa302e42cdf7684785a7d.tar.gz |
- fix source address selection when picking an acceptable address
- name change of prefered -> preferred
- CMT fast recover code added.
- Comment fixes in CMT.
- We were not giving a reason of cant_start_asoc per socket api
if we failed to get init/or/cookie to bring up an assoc. Change
so we don't just give a generic "comm lost" but look at actual
states of dying assoc.
- change "crc32" arguments to "crc32c" to silence strict/noisy
compiler warnings when crc32() is also declared
- A few minor tweaks to get the portable stuff truely portable
for sctp6_usrreq.c :-D
- one-2-one style vrf match problem.
- window recovery would leave chks marked for retran
during window probes on the sent queue. This would then
cause an out-of-order problem and assure that the flight
size "problem" would occur.
- Solves a flight size logging issue that caused rwnd
overruns, flight size off as well as false retransmissions.g
- Macroize the up and down of flight size.
- Fix a ECNE bug in its counting.
- The strict_sacks options was causing aborts when window probing
was active, fix to make strict sacks a bit smarter about what
the next unsent TSN is.
- Fixes a one-2-one wakeup bug found by Martin Kulas.
- If-defed out form, Andre's copy routines pending his
commit of at least m_last().. need to adjust for 6.2 as
well.. since m_last won't exist.
Reviewed by: gnn
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/sctp6_usrreq.c | 50 |
1 files changed, 22 insertions, 28 deletions
diff --git a/sys/netinet6/sctp6_usrreq.c b/sys/netinet6/sctp6_usrreq.c index d08c1f7..eddc0ae 100644 --- a/sys/netinet6/sctp6_usrreq.c +++ b/sys/netinet6/sctp6_usrreq.c @@ -31,33 +31,35 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); + #include <netinet/sctp_os.h> #include <sys/proc.h> #include <netinet/sctp_pcb.h> #include <netinet/sctp_header.h> #include <netinet/sctp_var.h> +#if defined(INET6) +#include <netinet6/sctp6_var.h> +#endif #include <netinet/sctp_sysctl.h> #include <netinet/sctp_output.h> -#include <netinet/sctp_input.h> -#include <netinet/sctp_bsd_addr.h> #include <netinet/sctp_uio.h> #include <netinet/sctp_asconf.h> #include <netinet/sctputil.h> #include <netinet/sctp_indata.h> -#include <netinet/sctp_asconf.h> #include <netinet/sctp_timer.h> #include <netinet/sctp_auth.h> -#include <netinet6/sctp6_var.h> - +#include <netinet/sctp_input.h> +#include <netinet/sctp_output.h> extern struct protosw inetsw[]; + int -sctp6_input(mp, offp, proto) - struct mbuf **mp; +sctp6_input(i_pak, offp, proto) + struct mbuf **i_pak; int *offp; int proto; { @@ -76,7 +78,8 @@ sctp6_input(mp, offp, proto) int off = *offp; vrf_id = SCTP_DEFAULT_VRFID; - m = SCTP_HEADER_TO_CHAIN(*mp); + m = SCTP_HEADER_TO_CHAIN(*i_pak); + ip6 = mtod(m, struct ip6_hdr *); /* Ensure that (sctphdr + sctp_chunkhdr) in a row. */ @@ -100,7 +103,9 @@ sctp6_input(mp, offp, proto) SCTP_STAT_INCR_COUNTER64(sctps_inpackets); #ifdef SCTP_DEBUG if (sctp_debug_on & SCTP_DEBUG_INPUT1) { - printf("V6 input gets a packet iphlen:%d pktlen:%d\n", iphlen, SCTP_HEADER_LEN((*mp))); + printf("V6 input gets a packet iphlen:%d pktlen:%d\n", iphlen, + SCTP_HEADER_LEN((*i_pak)) + ); } #endif if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst)) { @@ -200,7 +205,6 @@ sctp_skip_csum: } #endif /* IPSEC */ - /* * CONTROL chunk processing */ @@ -682,7 +686,8 @@ sctp_must_try_again: /* This could be made common with sctp_detach() since they are identical */ -static int +static +int sctp6_disconnect(struct socket *so) { struct sctp_inpcb *inp; @@ -715,23 +720,10 @@ sctp6_disconnect(struct socket *so) if (SCTP_GET_STATE(asoc) != SCTP_STATE_COOKIE_WAIT) { /* Left with Data unread */ - struct mbuf *err; - - err = NULL; - MGET(err, M_DONTWAIT, MT_DATA); - if (err) { - /* - * Fill in the user - * initiated abort - */ - struct sctp_paramhdr *ph; - - ph = mtod(err, struct sctp_paramhdr *); - SCTP_BUF_LEN(err) = sizeof(struct sctp_paramhdr); - ph->param_type = htons(SCTP_CAUSE_USER_INITIATED_ABT); - ph->param_length = htons(SCTP_BUF_LEN(err)); - } - sctp_send_abort_tcb(stcb, err); + struct mbuf *op_err; + + op_err = sctp_generate_invmanparam(SCTP_CAUSE_USER_INITIATED_ABT); + sctp_send_abort_tcb(stcb, op_err); SCTP_STAT_INCR_COUNTER32(sctps_aborted); } SCTP_INP_RUNLOCK(inp); @@ -803,6 +795,7 @@ sctp6_disconnect(struct socket *so) } } + int sctp_sendm(struct socket *so, int flags, struct mbuf *m, struct sockaddr *addr, struct mbuf *control, struct thread *p); @@ -1221,6 +1214,7 @@ sctp6_in6getaddr(struct socket *so, struct sockaddr **nam) in6_sin_2_v4mapsin6((struct sockaddr_in *)addr, &sin6); memcpy(addr, &sin6, sizeof(struct sockaddr_in6)); + } } return (error); |