Harald Welte has submitted this change and it was merged. Change subject: RSL: Send ERROR REPORT on too short/truncated messages + wrong discriminator ......................................................................
RSL: Send ERROR REPORT on too short/truncated messages + wrong discriminator Change-Id: I6a0e63999f39592474064e2f05df450aec8e37fe --- M src/common/rsl.c 1 file changed, 6 insertions(+), 0 deletions(-) Approvals: Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/common/rsl.c b/src/common/rsl.c index 2638ad2..bffe69d 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -2276,6 +2276,7 @@ if (msgb_l2len(msg) < sizeof(*rh)) { LOGP(DRSL, LOGL_NOTICE, "RSL Radio Link Layer message too short\n"); + rsl_tx_error_report(trx, RSL_ERR_PROTO); msgb_free(msg); return -EIO; } @@ -2469,6 +2470,7 @@ if (msgb_l2len(msg) < sizeof(*cch)) { LOGP(DRSL, LOGL_NOTICE, "RSL Common Channel Management message too short\n"); + rsl_tx_error_report(trx, RSL_ERR_PROTO); msgb_free(msg); return -EIO; } @@ -2598,6 +2600,7 @@ if (msgb_l2len(msg) < sizeof(*th)) { LOGP(DRSL, LOGL_NOTICE, "RSL TRX message too short\n"); + rsl_tx_error_report(trx, RSL_ERR_PROTO); msgb_free(msg); return -EIO; } @@ -2626,6 +2629,7 @@ if (msgb_l2len(msg) < sizeof(*dch)) { LOGP(DRSL, LOGL_NOTICE, "RSL ip.access message too short\n"); + rsl_tx_error_report(trx, RSL_ERR_PROTO); msgb_free(msg); return -EIO; } @@ -2683,6 +2687,7 @@ if (msgb_l2len(msg) < sizeof(*rslh)) { LOGP(DRSL, LOGL_NOTICE, "RSL message too short\n"); + rsl_tx_error_report(trx, RSL_ERR_PROTO); msgb_free(msg); return -EIO; } @@ -2708,6 +2713,7 @@ default: LOGP(DRSL, LOGL_NOTICE, "unknown RSL msg_discr 0x%02x\n", rslh->msg_discr); + rsl_tx_error_report(trx, RSL_ERR_MSG_DISCR); msgb_free(msg); ret = -EINVAL; } -- To view, visit https://gerrit.osmocom.org/6876 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I6a0e63999f39592474064e2f05df450aec8e37fe Gerrit-PatchSet: 1 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Harald Welte <lafo...@gnumonks.org> Gerrit-Reviewer: Jenkins Builder