Commit Graph

31 Commits

Author SHA1 Message Date
Holger Hans Peter Freyther faf1f64a2d gprs: Honor GSM 04.64 8.4.2 Receipt of unacknowledged information
GSM 04.64 8.4.2 asks to ignore UI frames if the DLCI is not known,
or if the "(V(UR)- 32) <= N(U) < V(UR)". E.g. if we want to have
V(UR) == 511 and this frame is dropped, we would ignore N(U)'s
0 to 510. Calculate the delta.

The code is based on Jonathan Santos's "LLC UI window" fix but the
issue was discovered independly.
2012-01-06 18:52:05 +01:00
Harald Welte 066a0f5c0b GPRS LLC: fix compiler warning 2011-10-16 18:59:20 +02:00
Harald Welte 0c1a30312d LLC: Add minimal LLGMM-RESET.req implementation
Using LLGMM-RESET.req, the GMM can request the LLC of the MS to reset
all its parameters, particularly the sequence numbers.  We don't yet do
XID RESET retransmissions, and we don't yet generate a LLGMM-RESET.conf
primitive back to GMM.
2011-10-16 18:58:30 +02:00
Holger Hans Peter Freyther 3dccda5ef0 gprs: Fix various compiler warnings 2011-10-14 23:42:13 +02:00
Dieter Spaar 1f447fbef1 LLC: Fix format string 2011-07-27 23:38:46 +02:00
Pablo Neira Ayuso 136f453dd2 src: use new library libosmogsm and new path to headers in libosmocore
libosmogsm is a new library that is distributed in the libosmocore.
Now, openbsc depends on it. This patch gets openbsc with this
change.

This patch also rewrites all include path to the new
osmocom/[gsm|core]

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-23 18:17:56 +01:00
Harald Welte f0901f0067 [SGSN] Fix processing of RA Update Request regarding TLLI
In case we get a RA UPD REQ on a new cell (both served by the same
SGSN), the LLC stack should not allocate a ne LLE/LLME, as the latter
would reset the V(u)sent / V(u)recv to zero and make the MS discard
our responses.

Instead, whenever the LLC stack sees a foreign TLLI, it should always
convert it to the local TLLI before doing any lookup for a LLE/LLME.
2011-01-01 17:28:29 +01:00
Harald Welte 9af6ddfcec License change: We are now AGPLv3+ instead of GPLv2+
The reason for this is quite simple: We want to make sure anyone
running a customized version of OpenBSC to operate a network will
have to release all custom modifiations to the source code.
2011-01-01 15:39:34 +01:00
Sylvain Munaut 6f3850fcac gprs/llc: Don't check FCS in gprs_llc_hdr_dump
The FCS isn't computed yet (because of ciphering).

It _will_ be tested and reported as wrong later in the code
so we can just display it here and let the latter code report the
error if any.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-07-03 22:24:13 +02:00
Harald Welte 3e2e159707 [SGSN] LLC: only copy Kc if algorithm != GPRS_ALGO_GEA0
The caller currently has set the Kc pointer to NULL, this fix avoids
crashing at the callee.
2010-07-02 22:56:55 +02:00
Harald Welte 1b8827ae5b [SGSN] LLC: Make sure we calculate FCS after decryption 2010-07-02 22:55:39 +02:00
Harald Welte d07b4f99ce [SGSN] Use libosmocore GPRS encryption plugins from LLC layer
This adds the bits that call into libosmocore (and its plugins)
to implement GPRS (LLC) encryption.
2010-07-02 22:55:39 +02:00
Harald Welte 496aee463f [SGSN] Call libosmocore helper to load cipher plugins 2010-07-02 22:54:55 +02:00
Harald Welte 875840c603 [SGSN] Fix TLLI (re)assignments
Once The TLLI (or P-TMSI of which it is derived) change has been
confirmed by the MS, we need to unassign the old TLLI but keep
the new TLLI  _without_ re-setting the LLC entity structure such
as VUsend /VUrecv counters.
2010-07-01 11:54:31 +02:00
Harald Welte f7fef48e1b [SGSN] LLC: properly free LLC entities at TLLI unassignment 2010-06-28 22:18:26 +02:00
Holger Hans Peter Freyther 2788b96bf4 gprs: Fix LOGP misuse and specify LOGL_NOTICE as region. 2010-06-23 09:48:25 +08:00
Harald Welte 1d9d944310 [GPRS] LLC: Implement per-SAPI default values for LLC parameters 2010-06-03 07:11:04 +02:00
Harald Welte ebabdea0a6 [GPRS] hand SNDCP N-PDUs to the GTP to the GGSN
This so far only works for UNIT-DATA and only if the N-PDU is not fragmented at
the SNDCP layer.
2010-06-01 18:28:10 +02:00
Harald Welte 807a5d8264 [GPRS] Major LLC / TLLI handling fixes
* separate the LLME and LLE state in the LLC layer
* introduce gprs_llgmm_assign() function for LLGMM-ASSIGN.req primitive
* change QoS profile to match 'real' SGSN
* Update the new TLLI when assigning a P-TMSI

The result now is that the LLC layer is notified of TLLI changes, which in turn
means it doesn't allocate a new LLE structure every TLLI change, which again
in turn means that the UI frame sequence number does not reset to zero.

As a result, MS should no longer ignore frames based on wrong UI sequence number.
2010-06-01 11:57:13 +02:00
Harald Welte 56a0145dd8 [GPRS] Include IMSI and DRX params in BSSGP DL-UD
When we send a downlink unit-data request via BSSGP, there is a lot
of information that needs to be copied from the mm context, such as
the IMSI, DRX parametes, MS radio access parameters, ...

This is a quite strange layering violation, since we now need to pass
a pointer to the MM ctx from GMM through LLC into BSSGP :(
2010-05-31 22:12:30 +02:00
Harald Welte 6bdee6ada3 [GPRS] LLC: Increment V(U) and N(U) 2010-05-30 22:00:42 +02:00
Holger Hans Peter Freyther fa848d4923 gprs: Cast the lh to uint_8* and make the other method non-const
We are assigning the header to non const methods... so make
the param non-const.
2010-05-23 21:43:57 +08:00
Holger Hans Peter Freyther 3a6fdcd717 gprs: make gprs_llc_hdr_dump return void. 2010-05-23 21:35:25 +08:00
Holger Hans Peter Freyther 4752e0c3de gprs_llc.c: memset the llhp struct to be sure it is initialized. 2010-05-23 21:33:57 +08:00
Harald Welte d764c064bb [GPRS] LLC: Fix logic to detect unknown TLLI/SAPI 2010-05-18 12:45:08 +02:00
Harald Welte b61f403dd3 [GPRS] LLC: print human-readable LLC command type 2010-05-18 12:31:50 +02:00
Harald Welte 2e918a87eb [GPRS] LLC: Add VTY interface for LLC 2010-05-18 12:22:12 +02:00
Harald Welte 1b170d1145 [GPRS] LLC: Start using different log levels 2010-05-13 21:29:11 +02:00
Harald Welte c6ecafe60c [GPRS] LLC: Use DLLC instead of DGPRS 2010-05-13 21:29:11 +02:00
Harald Welte 1ae09c7bd6 [GPRS] LLC: Improve implementation compliance to spec
Don't allocate a LLC Entity just because BSSGP passes any random
SAPI/TLLI up to us.  We can only do this for XID and UI frames
of the GMM SAPI.

Furthermore, add more comments and debug messages.
2010-05-13 21:29:11 +02:00
Harald Welte e236596bf4 [gprs] Move all GPRS related code to src/gprs subdirectory 2010-05-04 07:41:59 +02:00