u8 is_ip4, u32 fib_index)
{
sctp_enqueue_to_ip_lookup_i (vm, b, bi, is_ip4, fib_index, 0);
+ if (vm->thread_index == 0 && vlib_num_workers ())
+ session_flush_frames_main_thread (vm);
}
/**
void
sctp_prepare_initack_chunk (sctp_connection_t * sctp_conn, u8 idx,
vlib_buffer_t * b, ip4_address_t * ip4_addr,
- ip6_address_t * ip6_addr)
+ u8 add_ip4, ip6_address_t * ip6_addr, u8 add_ip6)
{
vlib_main_t *vm = vlib_get_main ();
sctp_ipv4_addr_param_t *ip4_param = 0;
u16 alloc_bytes =
sizeof (sctp_init_ack_chunk_t) + sizeof (sctp_state_cookie_param_t);
- if (PREDICT_TRUE (ip4_addr != NULL))
+ if (PREDICT_FALSE (add_ip4 == 1))
{
/* Create room for variable-length fields in the INIT_ACK chunk */
alloc_bytes += SCTP_IPV4_ADDRESS_TYPE_LENGTH;
}
- if (PREDICT_TRUE (ip6_addr != NULL))
+ if (PREDICT_FALSE (add_ip6 == 1))
{
/* Create room for variable-length fields in the INIT_ACK chunk */
alloc_bytes += SCTP_IPV6_ADDRESS_TYPE_LENGTH;
{
clib_warning
("Trying to send an unrecognized chunk... something is really bad.");
- error0 = SCTP_ERROR_UNKOWN_CHUNK;
+ error0 = SCTP_ERROR_UNKNOWN_CHUNK;
next0 = SCTP_OUTPUT_NEXT_DROP;
goto done;
}
connection.rmt_port,
sctp_hdr->dst_port);
- error0 = SCTP_ERROR_UNKOWN_CHUNK;
+ error0 = SCTP_ERROR_UNKNOWN_CHUNK;
next0 = SCTP_OUTPUT_NEXT_DROP;
goto done;
}
sctp_chunk_to_string (chunk_type),
sctp_state_to_string (sctp_conn->state));
- error0 = SCTP_ERROR_UNKOWN_CHUNK;
+ error0 = SCTP_ERROR_UNKNOWN_CHUNK;
next0 = SCTP_OUTPUT_NEXT_DROP;
goto done;