aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/sctp/sctp.h
diff options
context:
space:
mode:
authorMarco Varlese <marco.varlese@suse.com>2018-02-14 15:38:35 +0100
committerMarco Varlese <marco.varlese@suse.com>2018-02-15 10:11:57 +0100
commitfae4039ad2af251690e4cb79d5842a6e97029032 (patch)
treeacfe7c76383df97a7fc7c285860d4b7338b2610c /src/vnet/sctp/sctp.h
parenta38783e0d1ab1d4c661570a1ec90670a1fb0598d (diff)
SCTP: fix corrupted buffers seen in output node
The issue observed in the output-node was actually caused by one of the input-node pushing buffers to the output node when not required. That is the case with the parsing/handling of incoming packets like the COOKIE_ACK, HEARTBEAT_ACK, DATA, SACK which do not require a response to be sent to the other peer. In all the mentioned cases the packets (buffers) need to be consumed and dropped instead of heading to the output-node. Change-Id: I3dcbe5de1cedb2ab8b06fff4364749b525cc7ac6 Signed-off-by: Marco Varlese <marco.varlese@suse.com>
Diffstat (limited to 'src/vnet/sctp/sctp.h')
-rw-r--r--src/vnet/sctp/sctp.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vnet/sctp/sctp.h b/src/vnet/sctp/sctp.h
index bc974d948de..25fae37b6f7 100644
--- a/src/vnet/sctp/sctp.h
+++ b/src/vnet/sctp/sctp.h
@@ -251,7 +251,8 @@ void sctp_send_init (sctp_connection_t * sctp_conn);
void sctp_send_shutdown (sctp_connection_t * sctp_conn);
void sctp_send_shutdown_ack (sctp_connection_t * sctp_conn,
vlib_buffer_t * b);
-void sctp_send_shutdown_complete (sctp_connection_t * sctp_conn);
+void sctp_send_shutdown_complete (sctp_connection_t * sctp_conn,
+ vlib_buffer_t * b0);
void sctp_send_heartbeat (sctp_connection_t * sctp_conn);
void sctp_flush_frame_to_output (vlib_main_t * vm, u8 thread_index,
u8 is_ip4);
@@ -718,6 +719,9 @@ sctp_pick_conn_idx_on_chunk (sctp_chunk_type chunk_type)
case CWR:
case SHUTDOWN_COMPLETE:
idx = MAIN_SCTP_SUB_CONN_IDX;
+ break;
+ default:
+ idx = 0;
}
return idx;
}