aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJacob Erlbeck <jerlbeck@sysmocom.de>2014-09-11 14:20:53 +0200
committerJacob Erlbeck <jerlbeck@sysmocom.de>2014-09-19 11:55:21 +0200
commit25ad52cf6ad66d83696db74fd665e3a7a41b131b (patch)
treeab6d230d58c042134f585746333e3b3d18b19efd
parent91a0e8639a74231f41d14ca7cc952079cc541755 (diff)
sgsn: Reset local LLC parameters when sending XID reset
Currently when gprs_llgmm_reset() is invoked an XID reset is sent but the local LLC parameters (e.g. V(U)) are not cleared (see GSM 04.64, 8.5.3.1). This can lead to discarded messages on the SGSN side. This patch modifies gprs_llgmm_reset to clear vu_send, vu_recv, oc_ui_send, oc_ui_recv. Sponsored-by: On-Waves ehf
-rw-r--r--openbsc/src/gprs/gprs_llc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/openbsc/src/gprs/gprs_llc.c b/openbsc/src/gprs/gprs_llc.c
index e6b1f07da..08a95b336 100644
--- a/openbsc/src/gprs/gprs_llc.c
+++ b/openbsc/src/gprs/gprs_llc.c
@@ -738,14 +738,21 @@ int gprs_llgmm_reset(struct gprs_llc_llme *llme)
{
struct msgb *msg = msgb_alloc_headroom(4096, 1024, "LLC_XID");
int random = rand();
+ struct gprs_llc_lle *lle = &llme->lle[1];
/* First XID component must be RESET */
msgb_put_xid_par(msg, GPRS_LLC_XID_T_RESET, 0, NULL);
/* randomly select new IOV-UI */
msgb_put_xid_par(msg, GPRS_LLC_XID_T_IOV_UI, 4, (uint8_t *) &random);
+ /* Reset some of the LLC parameters. See GSM 04.64, 8.5.3.1 */
+ lle->vu_recv = 0;
+ lle->vu_send = 0;
+ lle->oc_ui_send = 0;
+ lle->oc_ui_recv = 0;
+
/* FIXME: Start T200, wait for XID response */
- return gprs_llc_tx_xid(&llme->lle[1], msg, 1);
+ return gprs_llc_tx_xid(lle, msg, 1);
}
int gprs_llc_init(const char *cipher_plugin_path)