Age | Commit message (Collapse) | Author | Files | Lines |
|
Introduce struct gsm_rnc, stored in a global list, static to iu.c.
(This list is not part of gsm_network so that the code can be
used from both MSC and GPRS code, i.e. both for CS and PS.)
Parse RANAP Global RNC Id, add GSM flags to build for gsm48_mcc_mnc_from_bcd()
to decode the PLMN Id.
Upon every Initial UE message, record/verify RNC Id and LAC for that
connection. In case of mismatch, so far just log an error.
|
|
Introduce talloc_iu_ctx, setup during iu_init() as child of the talloc_ctx
passed in by the caller.
Allocate ue_conn_ctx from talloc_iu_ctx, used to be from NULL.
Allocate osmo_sua_user and talloc_asn1_ctx from talloc_iu_ctx, used to be from
the ctx passed in by iu_init() caller.
|
|
|
|
|
|
See in-code comment...
|
|
|
|
|
|
|
|
|
|
Add lac argument to gsm0408_rcvmsg_iucs(), to record the LAC in newly
allocated gsm_subscriber_connections.
In effect, fix the LAC sent to UE during Location Updating Accept message.
Before, 0 was stored as LAC and sent to the UE, regardless of the actual
LAC in use.
|
|
It is only used statically in iu.c
|
|
Include a cscn section with subscriber-create-on-demand even though that is
the default.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Conflicts:
openbsc/src/libmsc/auth.c
openbsc/src/libmsc/gsm_04_08.c
openbsc/src/osmo-bsc/osmo_bsc_vty.c
openbsc/tests/Makefile.am
|
|
Make sure a new auth tuple is initialized after
db_get_lastauthtuple_for_subscr() returns an error, i.e. if no tuple is present
for the subscriber yet.
Before this patch, the first key_seq depended on the typically uninitialized
value that was present in auth tuple's key_seq upon calling
auth_get_tuple_for_subscr().
The very first key_seq used for a new subscriber will now always be 0. Before,
it used to be mostly 1 ("(0 + 1) % 7"), but depended on whether the key_seq was
indeed initialized with 0, actually by random.
|
|
In auth_get_tuple_for_subscr(), add missing condition to match incoming
key_seq with stored key_seq, so that re-authentication is requested for
mismatching key_seqs.
Add test for this issue.
|
|
AUTH_NOT_AVAIL == 0, so this is no functional change.
|
|
Instead of using hardcoded -1 for errors, include -1 in the enum auth_action
type; apply its use.
In the mm_auth test, the string output changes from '(internal error)' to
'AUTH_ERROR', since now the proper enum value is used in auth_action_names[].
|
|
|
|
Test two situations for AUTH_DO_AUTH_THEN_CIPH:
- when no auth tuple is available
- when the key sequence from LU is marked invalid
Add convenience auth tuple comparison function using stringification.
|
|
Add basic MM Authentication test setup, with fake DB access and RAND_bytes().
So far implement simple tests for IO error during DB access and missing auth
entry.
To print the auth action during tests, add struct auth_action_names and
auth_action_str() inline function in auth.[hc].
|
|
Don't store an MSC index number in the vty->index void* value. Instead,
store the osmo_msc_data struct directly. Thus avoid warnings about
differences in int vs void* sizes, and save some index lookups.
|
|
|
|
Upon authentication response, initiate integrity protection for Iu by sending a
Security Mode Command (IK), with hardcoded auth tuple so far.
Implement RANAP event handling to receive Security Mode Complete message,
adding stubs for the other events; in new files osmo-cscn/iucs_ranap.[hc] to
keep RANAP dependencies separate, and particularly out of libmsc.
Upon receiving Security Mode Complete, call the security operation callback
(conn->sec_operation->cb) to complete the Location Update.
Introduce enum integrity_protection_state constants to indicate integrity
protection, record in gsm_subscriber_conn.iu.integrity_protection.
Make subscr_conn_lookup_iu() non-static and declare in iu_cs.h to be able to
call from iucs_ranap.c's Security Mode Complete event.
Implement dummy iu_tx_sec_mode_cmd() to allow tests to build without RANAP
dependencies.
In cscn_main.c, call iucs_rx_ranap_event(), to populate the struct gsm_network
struct with cscn_network explicitly (don't share cscn_network across
compilation scopes because it's ugly).
|
|
directly
|
|
sgsn_libgtp.c: missing include, for asn1str_to_u32()
iu_cs.c: missing include, for subscr_name()
osmo_bsc_vty.c: int/pointer conversions
(note: this was discussed on the list to be solved by passing a pointer
instead. Until then...)
iudummy.c: opaque struct declarations
|
|
Prepares for calling from IuCS RANAP events.
|
|
In this way the caller can distinguish between sending an IK or an IK+CK
Security Mode Command.
|
|
|
|
|
|
gprs_gmm.c: remove extraneous debug print arg.
iu_cs.c: increment should not be in debug statement.
Fixes at least one coverity warning.
|
|
|
|
|
|
|
|
|
|
|
|
Error was introduced in d04db9d907
'libiu: Replace RAB assignment response callback with a general one'
For iu_rab_act_ps(), the rab_id parameter was added in iu.h but not in the
implementation, nor for the callers. Make the iu.h signature match the
implementation, again.
|
|
In Iu mode the RA upd request can be called from a new Iu connection so we
might need to reauthenticate the connection as well as turn on integrity
protection.
|
|
|
|
gprs_transp_upd_key only sends a security mode command which is needed for CS
as well so change it.
Make sure it is called after the UE is authenticated in Iu mode.
|
|
This reverts commit 044fbe6568f82a12bf4e3addc7e3d6db529b6548.
|
|
In OpenBSC, we traditionally displayed a TMSI in its integer
representation, which is quite unusual in the telecom world. A TMSI is
normally printed as a series of 8 hex digits.
This patch aligns OpenBSC with the telecom industry standard.
Signed-off-by: Vadim Yanitskiy <axilirator@gmail.com>
|