aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2023-07-26 20:36:53 +0200
committerPau Espin Pedrol <pespin@sysmocom.de>2023-07-28 13:48:25 +0200
commitd8d592db5494c764d89c9921acfb8307789c28ba (patch)
treea041f37c1e55084d39b46dbaae214a39d8ef6e54
parent9b5002819207129d79b487ca2e35ddbba6c6d4cd (diff)
llc: Set proper SAPI when transmitting UNITDATA.req to GRR/BSSGP
-rw-r--r--src/llc/llc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/llc/llc.c b/src/llc/llc.c
index bcd33b5..d58b454 100644
--- a/src/llc/llc.c
+++ b/src/llc/llc.c
@@ -279,12 +279,14 @@ int gprs_llc_lle_tx_xid(const struct gprs_llc_lle *lle, uint8_t *xid_payload, un
msgb_free(msg);
return rc;
}
- if (g_llc_ctx->location == OSMO_GPRS_LLC_LOCATION_MS) {
+ if (g_llc_ctx->location == OSMO_GPRS_LLC_LOCATION_SGSN) {
llc_prim->bssgp.ll_pdu = msgb_l3(msg);
llc_prim->bssgp.ll_pdu_len = msgb_l3len(msg);
+ llc_prim->bssgp.dl_unitdata_req.sapi = lle->sapi;
} else {
llc_prim->grr.ll_pdu = msgb_l3(msg);
llc_prim->grr.ll_pdu_len = msgb_l3len(msg);
+ llc_prim->grr.unitdata_req.sapi = lle->sapi;
}
/* Send GRR-UNITDATA.req */
@@ -319,12 +321,14 @@ int gprs_llc_lle_tx_null(const struct gprs_llc_lle *lle)
msgb_free(msg);
return rc;
}
- if (g_llc_ctx->location == OSMO_GPRS_LLC_LOCATION_MS) {
+ if (g_llc_ctx->location == OSMO_GPRS_LLC_LOCATION_SGSN) {
llc_prim->bssgp.ll_pdu = msgb_l3(msg);
llc_prim->bssgp.ll_pdu_len = msgb_l3len(msg);
+ llc_prim->bssgp.dl_unitdata_req.sapi = lle->sapi;
} else {
llc_prim->grr.ll_pdu = msgb_l3(msg);
llc_prim->grr.ll_pdu_len = msgb_l3len(msg);
+ llc_prim->grr.unitdata_req.sapi = lle->sapi;
}
/* Send BSSGP-DL-UNITDATA.req (SGSN) / GRR-UNITDATA.req (MS) */
@@ -384,6 +388,7 @@ int gprs_llc_lle_tx_ui(struct gprs_llc_lle *lle, uint8_t *l3_pdu, size_t l3_pdu_
if (g_llc_ctx->location == OSMO_GPRS_LLC_LOCATION_SGSN) {
llc_prim->bssgp.ll_pdu = msgb_l3(msg);
llc_prim->bssgp.ll_pdu_len = msgb_l3len(msg);
+ llc_prim->bssgp.dl_unitdata_req.sapi = lle->sapi;
} else {
llc_prim->grr.ll_pdu = msgb_l3(msg);
llc_prim->grr.ll_pdu_len = msgb_l3len(msg);