diff options
Diffstat (limited to 'src/vnet/sctp')
-rw-r--r-- | src/vnet/sctp/sctp_error.def | 3 | ||||
-rw-r--r-- | src/vnet/sctp/sctp_input.c | 10 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/vnet/sctp/sctp_error.def b/src/vnet/sctp/sctp_error.def index 7326301e862..b95b71a9417 100644 --- a/src/vnet/sctp/sctp_error.def +++ b/src/vnet/sctp/sctp_error.def @@ -13,6 +13,8 @@ * limitations under the License. */ sctp_error (NONE, "no error") +sctp_error (WRONG_WORKER, "Wrong worker thread") +sctp_error (FILTERED, "Packets filtered") sctp_error (PKTS_SENT, "Packets sent") sctp_error (INVALID_CONNECTION, "Invalid connection") sctp_error (INVALID_TAG, "Invalid verification tag") @@ -47,5 +49,4 @@ sctp_error (EVENT_FIFO_FULL, "Events not sent for lack of event fifo space") sctp_error (UNKNOWN_CHUNK, "Unrecognized / unknown chunk or chunk-state mismatch") sctp_error (BUNDLING_VIOLATION, "Bundling not allowed") sctp_error (PUNT, "Packets punted") -sctp_error (FILTERED, "Packets filtered") sctp_error (MAX_CONNECTIONS, "Reached max supported subconnection") diff --git a/src/vnet/sctp/sctp_input.c b/src/vnet/sctp/sctp_input.c index 4454f99e6bb..88e4eab754d 100644 --- a/src/vnet/sctp/sctp_input.c +++ b/src/vnet/sctp/sctp_input.c @@ -2114,7 +2114,7 @@ sctp46_input_dispatcher (vlib_main_t * vm, vlib_node_runtime_t * node, { u32 n_left_from, next_index, *from, *to_next; u32 my_thread_index = vm->thread_index; - u8 is_filtered; + u8 result; sctp_main_t *tm = vnet_get_sctp_main (); from = vlib_frame_vector_args (from_frame); @@ -2175,7 +2175,7 @@ sctp46_input_dispatcher (vlib_main_t * vm, vlib_node_runtime_t * node, sctp_hdr->src_port, TRANSPORT_PROTO_SCTP, my_thread_index, - &is_filtered); + &result); } else { @@ -2198,7 +2198,7 @@ sctp46_input_dispatcher (vlib_main_t * vm, vlib_node_runtime_t * node, sctp_hdr->src_port, TRANSPORT_PROTO_SCTP, my_thread_index, - &is_filtered); + &result); } /* Length check */ @@ -2256,10 +2256,10 @@ sctp46_input_dispatcher (vlib_main_t * vm, vlib_node_runtime_t * node, } else { - if (is_filtered) + if (result) { next0 = SCTP_INPUT_NEXT_DROP; - error0 = SCTP_ERROR_FILTERED; + error0 = SCTP_ERROR_NONE + result; } else if ((is_ip4 && tm->punt_unknown4) || (!is_ip4 && tm->punt_unknown6)) |