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/+/20097 ) Change subject: libgb/ns: allow to create NS_ALIVE NSVC ...................................................................... libgb/ns: allow to create NS_ALIVE NSVC Change-Id: I562c3ac4a8baaa2c97852bbd6a5a10ba1f144004 --- M src/gb/gprs_ns2.c 1 file changed, 27 insertions(+), 12 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/97/20097/1 diff --git a/src/gb/gprs_ns2.c b/src/gb/gprs_ns2.c index bae9438..0fa7197 100644 --- a/src/gb/gprs_ns2.c +++ b/src/gb/gprs_ns2.c @@ -625,15 +625,28 @@ return GPRS_NS2_CS_SKIPPED; } - /* Only the RESET procedure creates a new NSVC */ - if (nsh->pdu_type != NS_PDUT_RESET) { - rc = reject_status_msg(msg, &tp, reject, NS_CAUSE_PDU_INCOMP_PSTATE); + if (bind->vc_mode == NS2_VC_MODE_BLOCKRESET) { + /* Only the RESET procedure creates a new NSVC */ + if (nsh->pdu_type != NS_PDUT_RESET) { + 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; + if (rc < 0) { + LOGP(DLNS, LOGL_ERROR, "Failed to generate reject message (%d)\n", rc); + return rc; + } + return GPRS_NS2_CS_REJECTED; } - 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); + + 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, @@ -645,11 +658,13 @@ 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; + 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; + } } /* find or create NSE */ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/20097 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I562c3ac4a8baaa2c97852bbd6a5a10ba1f144004 Gerrit-Change-Number: 20097 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/20200912/8e4393dc/attachment.htm>