diff --git a/openair2/COMMON/x2ap_messages_types.h b/openair2/COMMON/x2ap_messages_types.h index d284f4d0b9d8b566511c835e3bcc6645d5f5284d..5a35b85fdb4e413d9f71fd3d475e163cdad09f3d 100644 --- a/openair2/COMMON/x2ap_messages_types.h +++ b/openair2/COMMON/x2ap_messages_types.h @@ -205,7 +205,7 @@ typedef struct x2ap_handover_req_s { x2ap_lastvisitedcell_info_t lastvisitedcell_info; - uint8_t rrc_buffer[1024 /* arbitrary, big enough */]; + uint8_t rrc_buffer[8192 /* arbitrary, big enough */]; int rrc_buffer_size; int target_assoc_id; diff --git a/openair2/RRC/LTE/rrc_eNB.c b/openair2/RRC/LTE/rrc_eNB.c index 5b9899159178ec132eb9d5829bbed233dbd50735..ac22da1b426aa7dac91685fb21529554e813192a 100644 --- a/openair2/RRC/LTE/rrc_eNB.c +++ b/openair2/RRC/LTE/rrc_eNB.c @@ -4614,10 +4614,10 @@ rrc_eNB_generate_HandoverPreparationInformation( uint8_t *buffer, int *_size ) { - memset(buffer, 0, RRC_BUF_SIZE); + memset(buffer, 0, 8192); char *ho_buf = (char *) buffer; int ho_size; - ho_size = do_HandoverPreparation(ho_buf, 1024, ue_context_pP->ue_context.UE_Capability, ue_context_pP->ue_context.UE_Capability_size); + ho_size = do_HandoverPreparation(ho_buf, 8192, ue_context_pP->ue_context.UE_Capability, ue_context_pP->ue_context.UE_Capability_size); *_size = ho_size; } diff --git a/openair2/X2AP/x2ap_eNB_handler.c b/openair2/X2AP/x2ap_eNB_handler.c index 2a44501a337a3008d7940aed17ba974d03774bcd..41d92a695e0da3b933a190502a44cdab1a831d08 100644 --- a/openair2/X2AP/x2ap_eNB_handler.c +++ b/openair2/X2AP/x2ap_eNB_handler.c @@ -730,7 +730,7 @@ int x2ap_eNB_handle_handover_preparation (instance_t instance, X2AP_RRC_Context_t *c = &ie->value.choice.UE_ContextInformation.rRC_Context; - if (c->size > 1024 /* TODO: this is the size of rrc_buffer in struct x2ap_handover_req_ack_s*/) + if (c->size > 8192 /* TODO: this is the size of rrc_buffer in struct x2ap_handover_req_s */) { printf("%s:%d: fatal: buffer too big\n", __FILE__, __LINE__); abort(); } memcpy(X2AP_HANDOVER_REQ(msg).rrc_buffer, c->buf, c->size); @@ -821,7 +821,7 @@ int x2ap_eNB_handle_handover_response (instance_t instance, X2AP_TargeteNBtoSource_eNBTransparentContainer_t *c = &ie->value.choice.TargeteNBtoSource_eNBTransparentContainer; - if (c->size > 1024 /* TODO: this is the size of rrc_buffer in struct x2ap_handover_req_ack_s*/) + if (c->size > 1024 /* TODO: this is the size of rrc_buffer in struct x2ap_handover_req_ack_s */) { printf("%s:%d: fatal: buffer too big\n", __FILE__, __LINE__); abort(); } memcpy(X2AP_HANDOVER_REQ_ACK(msg).rrc_buffer, c->buf, c->size); diff --git a/openair3/SCTP/sctp_default_values.h b/openair3/SCTP/sctp_default_values.h index 5008ea0b72bf6d9202bc633f44595e3b415eccce..528ffb5a05114aea3c37ea584e8a55f871210ddc 100644 --- a/openair3/SCTP/sctp_default_values.h +++ b/openair3/SCTP/sctp_default_values.h @@ -26,6 +26,6 @@ #define SCTP_IN_STREAMS (16) #define SCTP_MAX_ATTEMPTS (2) #define SCTP_TIMEOUT (5) -#define SCTP_RECV_BUFFER_SIZE (1024) +#define SCTP_RECV_BUFFER_SIZE (8192) #endif /* SCTP_DEFAULT_VALUES_H_ */ diff --git a/openair3/SCTP/sctp_eNB_task.c b/openair3/SCTP/sctp_eNB_task.c index e93488817832d9e52a59a14b9603f2c52cfe351c..3cb64254fccbcc4a9378f68f4b9cc523eb101c27 100644 --- a/openair3/SCTP/sctp_eNB_task.c +++ b/openair3/SCTP/sctp_eNB_task.c @@ -955,6 +955,11 @@ sctp_eNB_read_from_socket( return; } + if (!(flags & MSG_EOR)) { + SCTP_ERROR("fatal: partial SCTP messages are not handled\n"); + exit(1); + } + if (flags & MSG_NOTIFICATION) { union sctp_notification *snp; snp = (union sctp_notification *)buffer;