bssgp: Don't include RA-ID in BVC-RESET for BVCI=0 (signalling)
3GPP TS 48.018 is quite clear: The RA-ID must only be included
when a PTP-BVCI is being reset [and only if the sender is the BSS].
Before this patch, osmo-pcu is including the RA-ID in BVC-RESET
for BVCI=0.
Change-Id: Ie87820537d6d616da4fd4bbf73eab06e28fda5e1
diff --git a/src/gb/gprs_bssgp_bss.c b/src/gb/gprs_bssgp_bss.c
index 94b1812..d1734ee 100644
--- a/src/gb/gprs_bssgp_bss.c
+++ b/src/gb/gprs_bssgp_bss.c
@@ -318,7 +318,16 @@
}
int bssgp_tx_bvc_reset(struct bssgp_bvc_ctx *bctx, uint16_t bvci, uint8_t cause)
{
- return bssgp_tx_bvc_reset2(bctx, bvci, cause, bvci != BVCI_PTM);
+ /* The Cell Identifier IE is mandatory in the BVC-RESET PDU sent from BSS to SGSN in order to reset a
+ * BVC corresponding to a PTP functional entity. The Cell Identifier IE shall not be used in any other
+ * BVC-RESET PDU. */
+ switch (bvci) {
+ case BVCI_SIGNALLING:
+ case BVCI_PTM:
+ return bssgp_tx_bvc_reset2(bctx, bvci, cause, false);
+ default:
+ return bssgp_tx_bvc_reset2(bctx, bvci, cause, true);
+ }
}
/*! Transmit a FLOW_CONTROL-BVC (Chapter 10.4.4)