- Out with some printfs.
- Fix a initialization of last_tsn_used - Fix handling of mapped IPv4 addresses Obtained from: Michael Tuexen and I :-) MFC after: 1 week
This commit is contained in:
parent
cde2511802
commit
d6af161a34
@ -937,18 +937,13 @@ sctp_asconf_addr_match(struct sctp_asconf_addr *aa, struct sockaddr *sa)
|
||||
*/
|
||||
static uint32_t
|
||||
sctp_addr_match(
|
||||
#ifdef INET6
|
||||
struct sctp_ipv6addr_param *v6addr,
|
||||
#else
|
||||
struct sctp_ipv4addr_param *v4addr,
|
||||
#endif
|
||||
struct sockaddr *sa)
|
||||
{
|
||||
uint16_t param_type, param_length;
|
||||
|
||||
#ifdef INET6
|
||||
struct sctp_ipv4addr_param *v4addr = (struct sctp_ipv4addr_param *)v6addr;
|
||||
|
||||
#ifdef INET6
|
||||
if (sa->sa_family == AF_INET6) {
|
||||
/* IPv6 sa address */
|
||||
/* XXX scopeid */
|
||||
@ -963,8 +958,8 @@ sctp_addr_match(
|
||||
sizeof(struct in6_addr)) == 0)) {
|
||||
return (1);
|
||||
}
|
||||
} else
|
||||
#endif /* INET6 */
|
||||
}
|
||||
#endif
|
||||
if (sa->sa_family == AF_INET) {
|
||||
/* IPv4 sa address */
|
||||
struct sockaddr_in *sin = (struct sockaddr_in *)sa;
|
||||
|
@ -95,6 +95,9 @@ sctp_iterator_thread(void *v)
|
||||
msleep(&SCTP_BASE_INFO(iterator_running),
|
||||
&SCTP_BASE_INFO(ipi_iterator_wq_mtx),
|
||||
0, "waiting_for_work", 0);
|
||||
if (SCTP_BASE_INFO(threads_must_exit)) {
|
||||
kthread_exit(0);
|
||||
}
|
||||
sctp_iterator_worker();
|
||||
}
|
||||
}
|
||||
|
@ -382,8 +382,6 @@ __FBSDID("$FreeBSD$");
|
||||
* hit this value) */
|
||||
#define SCTP_DATAGRAM_RESEND 4
|
||||
#define SCTP_DATAGRAM_ACKED 10010
|
||||
#define SCTP_DATAGRAM_INBOUND 10011
|
||||
#define SCTP_READY_TO_TRANSMIT 10012
|
||||
#define SCTP_DATAGRAM_MARKED 20010
|
||||
#define SCTP_FORWARD_TSN_SKIP 30010
|
||||
|
||||
|
@ -323,7 +323,7 @@ sctp_process_init(struct sctp_init_chunk *cp, struct sctp_tcb *stcb,
|
||||
asoc->str_reset_seq_in = asoc->asconf_seq_in + 1;
|
||||
|
||||
asoc->mapping_array_base_tsn = ntohl(init->initial_tsn);
|
||||
asoc->cumulative_tsn = asoc->asconf_seq_in;
|
||||
asoc->tsn_last_delivered = asoc->cumulative_tsn = asoc->asconf_seq_in;
|
||||
asoc->last_echo_tsn = asoc->asconf_seq_in;
|
||||
asoc->advanced_peer_ack_point = asoc->last_acked_seq;
|
||||
/* open the requested streams */
|
||||
@ -3293,7 +3293,7 @@ sctp_handle_stream_reset_response(struct sctp_tcb *stcb,
|
||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) {
|
||||
sctp_log_map(0, 7, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT);
|
||||
}
|
||||
stcb->asoc.cumulative_tsn = stcb->asoc.highest_tsn_inside_map;
|
||||
stcb->asoc.tsn_last_delivered = stcb->asoc.cumulative_tsn = stcb->asoc.highest_tsn_inside_map;
|
||||
stcb->asoc.mapping_array_base_tsn = ntohl(resp->senders_next_tsn);
|
||||
memset(stcb->asoc.mapping_array, 0, stcb->asoc.mapping_array_size);
|
||||
stcb->asoc.sending_seq = ntohl(resp->receivers_next_tsn);
|
||||
@ -3399,7 +3399,7 @@ sctp_handle_str_reset_request_tsn(struct sctp_tcb *stcb,
|
||||
if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_MAP_LOGGING_ENABLE) {
|
||||
sctp_log_map(0, 10, asoc->highest_tsn_inside_map, SCTP_MAP_SLIDE_RESULT);
|
||||
}
|
||||
stcb->asoc.cumulative_tsn = stcb->asoc.highest_tsn_inside_map;
|
||||
stcb->asoc.tsn_last_delivered = stcb->asoc.cumulative_tsn = stcb->asoc.highest_tsn_inside_map;
|
||||
stcb->asoc.mapping_array_base_tsn = stcb->asoc.highest_tsn_inside_map + 1;
|
||||
memset(stcb->asoc.mapping_array, 0, stcb->asoc.mapping_array_size);
|
||||
atomic_add_int(&stcb->asoc.sending_seq, 1);
|
||||
|
@ -284,9 +284,6 @@ sctp_threshold_management(struct sctp_inpcb *inp, struct sctp_tcb *stcb,
|
||||
*ippp = htonl(SCTP_FROM_SCTP_TIMER + SCTP_LOC_1);
|
||||
}
|
||||
inp->last_abort_code = SCTP_FROM_SCTP_TIMER + SCTP_LOC_1;
|
||||
printf("Aborting association threshold:%d overall error count:%d\n",
|
||||
threshold,
|
||||
stcb->asoc.overall_error_count);
|
||||
sctp_abort_an_association(inp, stcb, SCTP_FAILED_THRESHOLD, oper, SCTP_SO_NOT_LOCKED);
|
||||
return (1);
|
||||
}
|
||||
|
@ -5483,10 +5483,10 @@ found_one:
|
||||
bzero(&sin6, sizeof(sin6));
|
||||
sin6.sin6_family = AF_INET6;
|
||||
sin6.sin6_len = sizeof(struct sockaddr_in6);
|
||||
sin6.sin6_addr.s6_addr16[2] = 0xffff;
|
||||
sin6.sin6_addr.s6_addr32[2] = htonl(0xffff);
|
||||
bcopy(&sin->sin_addr,
|
||||
&sin6.sin6_addr.s6_addr16[3],
|
||||
sizeof(sin6.sin6_addr.s6_addr16[3]));
|
||||
&sin6.sin6_addr.s6_addr32[3],
|
||||
sizeof(sin6.sin6_addr.s6_addr32[3]));
|
||||
sin6.sin6_port = sin->sin_port;
|
||||
memcpy(from, (caddr_t)&sin6, sizeof(sin6));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user