This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
lynxis lazus gerrit-no-reply at lists.osmocom.orglynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/20566 )
Change subject: gprs_ns2: Partial revert 48f63867 allow to create NS_ALIVE NSVC
......................................................................
gprs_ns2: Partial revert 48f63867 allow to create NS_ALIVE NSVC
NS_ALIVE can't create new NS-VC. Those NS-VC can be only created
by SNS or by vty.
Also fixes a crash because the TLV parser tried to retrieve NSEI TLV
which doesn't exist on NS_ALIVE PDUs.
Related: OS#4792
Change-Id: I16b9d7b2eb7544a83ce871d894887c4b30605b34
---
M src/gb/gprs_ns2.c
1 file changed, 10 insertions(+), 15 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/66/20566/1
diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c
index 7a15352..a0cbce1 100644
--- a/src/gb/gprs_ns2.c
+++ b/src/gb/gprs_ns2.c
@@ -663,16 +663,13 @@
return GPRS_NS2_CS_REJECTED;
}
} else { /* NS2_VC_MODE_ALIVE */
- /* Only the ALIVE procedure creates a new NSVC */
- if (nsh->pdu_type != NS_PDUT_ALIVE) {
- rc = reject_status_msg(msg, &tp, reject, NS_CAUSE_PDU_INCOMP_PSTATE);
+ rc = reject_status_msg(msg, &tp, reject, NS_CAUSE_PDU_INCOMP_PSTATE);
- if (rc < 0) {
- LOGP(DLNS, LOGL_ERROR, "Failed to generate reject message (%d)\n", rc);
- return rc;
- }
- return GPRS_NS2_CS_REJECTED;
+ if (rc < 0) {
+ LOGP(DLNS, LOGL_ERROR, "Failed to generate reject message (%d)\n", rc);
+ return rc;
}
+ return GPRS_NS2_CS_REJECTED;
}
rc = ns2_tlv_parse(&tp, nsh->data,
@@ -684,13 +681,11 @@
return GPRS_NS2_CS_REJECTED;
}
- if (bind->vc_mode == NS2_VC_MODE_BLOCKRESET) {
- if (!TLVP_PRESENT(&tp, NS_IE_CAUSE) ||
- !TLVP_PRESENT(&tp, NS_IE_VCI) || !TLVP_PRESENT(&tp, NS_IE_NSEI)) {
- LOGP(DLNS, LOGL_ERROR, "NS RESET Missing mandatory IE\n");
- rc = reject_status_msg(msg, &tp, reject, NS_CAUSE_MISSING_ESSENT_IE);
- return GPRS_NS2_CS_REJECTED;
- }
+ if (!TLVP_PRESENT(&tp, NS_IE_CAUSE) ||
+ !TLVP_PRESENT(&tp, NS_IE_VCI) || !TLVP_PRESENT(&tp, NS_IE_NSEI)) {
+ LOGP(DLNS, LOGL_ERROR, "NS RESET Missing mandatory IE\n");
+ rc = reject_status_msg(msg, &tp, reject, NS_CAUSE_MISSING_ESSENT_IE);
+ return GPRS_NS2_CS_REJECTED;
}
/* find or create NSE */
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/20566
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I16b9d7b2eb7544a83ce871d894887c4b30605b34
Gerrit-Change-Number: 20566
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201012/e3c169e6/attachment.htm>