aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-07-28dyn TS: gsm_lchan2chan_nr(): decouple from ts->pchanNeels Hofmeyr3-6/+16
For upcoming dynamic TS, the pchan choice for RSL De-/Activation is not trivial. So in order to pass the desired pchan to generate the RSL chan_nr, introduce gsm_lchan_as_pchan2chan_nr(). To avoid code dup, this requires decoupling the gsm_ts2chan_nr() pchan from the actual ts struct, so refactor gsm_ts2chan_nr() to gsm_pchan2chan_nr() with explicit pchan, ts_nr and lchan_nr arguments. Change-Id: I1a40e8452fe8120d350a27973e56be0b8c8c517f
2016-07-28dyn TS: rename lchan->dyn_pdch to lchan->dynNeels Hofmeyr2-5/+5
This will also be used by the new dynamic TS type, so make the name more general. Change-Id: I2451b10519dff3e5cdf503b430574c0984d19000
2016-07-28prepare dyn TS: act lchan: fetch the channel mode a bit laterNeels Hofmeyr1-8/+8
Dyn TS will add a new type of chan activation, which does not need a Channel Mode IE. Incidentally, the dyn PDCH also doesn't need this IE if it opts for sending a PDCH ACT instead. So it makes sense to compose the Channel Mode IE only after the dynamic decisions are done. Change-Id: I66d88ad6a4ae7bee1e552960fd4e92aff953125c
2016-07-28error log: rsl_chan_activate_lchan: log channel mode errorNeels Hofmeyr1-1/+5
Change-Id: I0f403b13ff9897770c0b855bf57a9440717b46e8
2016-07-28cosmetic: dyn_pdch_init(): debug log: use new gsm_ts_and_pchan_name()Neels Hofmeyr1-4/+4
Change-Id: I396c2696bdbedb41a1f1fe2183f8eada57dc3413
2016-07-28gsm_ts2chan_nr(): add assertions for lchan_nrNeels Hofmeyr1-0/+14
Change-Id: Ibfdef347c85d4a145645a7325cd193ea1b475a54
2016-07-28Modify SI 13 field to support 11 bit RACHbhargava5-1/+43
System Information 13 field EGPRS PACKET CHANNEL REQUEST is modified to support 11 bit RACH. Further VTY configuration is added to enable/disable 11 bit RACH support in EGPRS. By default 11 bit RACH support is disabled. Change-Id: I51357bec936c28a26ab9ff5d59e0e30ca3363297
2016-07-28debug log: fix line endings for abis_rsl_rx_rll loggingNeels Hofmeyr1-0/+3
This function outputs a debug log without line ending, which should be completed by a subsequent DEBUGPC(), so complete the started log line where missing in three of the switch cases. The three cases do print another log message, but since these don't start on a new line when RLL is in debug level, the log output for these is hard(er) to read without this patch. Change-Id: I355647e77e1b2d8e75ae1a167fe87a507a38d82d
2016-07-27Fix default subscriber regexpMax1-1/+1
Incorrect regular expression used by default to authorize all subscribers to implement authorization policy 'accept-all' prevented MS from camping on the open network. Change-Id: I20284b3d40ecf4ca1e67d8cd25afb8d5e4ae3025
2016-07-25log lchan_alloc() resultNeels Hofmeyr1-0/+8
It is particularly interesting to see whether a given lchan type is allocated on a dynamic timeslot. Change-Id: I8a0bca6d9cd583a0988e5ee8f4e6f74f218f4185
2016-07-25error log: abis_rsl.c: log errors in channel_mode_from_lchan()Neels Hofmeyr1-0/+12
Change-Id: Ifa416eab76e6c26dc83e979d815ae778d0d7133b
2016-07-25code dup: join [rsl_]lchan_lookup() from libbsc and osmo-btsNeels Hofmeyr3-42/+61
lchan_lookup in abis_rsl.c and rsl_lchan_lookup() from osmo-bts rsl.c are the same code, except for the log context, which is only set in abis_rsl.c. Factor out the common code to rsl_lchan_lookup() in gsm_data_shared.c. Openbsc and osmo-bts each define their own DRSL log constant, so add an int *rc return code argument and keep the logging part in abis_rsl.c's thin lchan_lookup() wrapper. Incidentally, this also removes code dup for logging. To avoid duplicate symbols, the rsl_lchan_lookup() implementation needs to be removed from osmo-bts, so older osmo-bts git revisions will not build with this. Change-Id: Ie89bc5bb9110a0e539d37991dedac6f913211b48
2016-07-25gsm_data_shared: add gsm_ts_and_pchan_name() for dyn ts loggingNeels Hofmeyr2-0/+50
Change-Id: I9b6be77c9e5fb9dffa2021a2da72293af15a03a0
2016-07-25dyn TS: add ts->dyn stateNeels Hofmeyr2-0/+8
Add state fields osmo_bts_trx_ts->dyn.* to record dynamic timeslot state. Initialize in gsm_bts_trx_alloc(). Change-Id: I0a4049df8500b4f7c864f1355c4e9238932d1b8f
2016-07-25cosmetic: rsl_rx_chan_act_ack(): use local lchan var in 14 instancesNeels Hofmeyr1-14/+15
In preparation for an upcoming change. Change-Id: I9ce71fd7dde42ad7d20f806ac70c150d11450efa
2016-07-25cosmetic: act lchan type: use constant instead of 0x00Neels Hofmeyr1-1/+1
Change-Id: Idc8afc4e52e189f474077899eef896381ce238f7
2016-07-25cosmetic: rsl_rx_rf_chan_rel_ack(): use local ts var for brevityNeels Hofmeyr1-5/+5
In preparation for an upcoming change. Change-Id: I11bd59492fa8d5b9392d9f2b511c8fa9585afe6c
2016-07-25comments: clarify some dynamic TS commentsNeels Hofmeyr2-6/+9
A new type of dynamic channel will be introduced soon, so prepare some comments to name the dynamic TS kind more specifically. Change-Id: I51fa8c2ebba507299e55a5cb7e67e48a6c8471f7
2016-07-25fix: create_pdp_conf(): unset reject_cause after unknown ran_typeNeels Hofmeyr1-0/+4
f9f4387686584d4575b326ac7414138d8ba0c641 introduced a check for ran_type, which potentially leaves reject_cause unset. Fix that. Change-Id: I0220841ff796f949d00a1415d46b54a3eacc9493
2016-07-25remove old copy of documentation that now is in osmo-gsm-manuals.gitHarald Welte3-739/+0
We keep some random snippets of documentation here, but manuals are now generally kept in osmo-gsm-manuals.git. Particularly the GSUP, OAP and control interface are documented more extensively there. To avoid having two sets of (diverging) documentation, let's remove it from the openbsc.git repository. Change-Id: I4a4c918587e236a7aa00cf2bb6aa05b090f7229b
2016-07-25sgsn: add statistics counter for GPRS and PDP packetsAlexander Couzens6-3/+82
Changing the test to allow still allocated block from the rate counters. Change-Id: Ie30e4c3084ee3a138d6b39bb5000234ac814e65f
2016-07-25bs11_config: add brackets to fix warning in argument parsingAlexander Couzens1-1/+2
Change-Id: I2f02e09a21ca622b03fd966445f533263a499c8d
2016-07-24fix ctrl test: dyn TS: use new GSM_PCHAN_TCH_F_TCH_H_PDCHNeels Hofmeyr3-5/+10
Add GSM_PCHAN_TCH_F_TCH_H_PDCH in gsm_pchant_names and gsm_pchant_descs: the VTY and CTRL can now handle the new pchan type. Adjust the CTRL iface test to expect the new PCHAN type in the output. Fixes make check with --enable-external-tests after libosmocore commit fd80f5a04239c2ab7b561401476dd89f2861748b that adds GSM_PCHAN_TCH_F_TCH_H_PDCH. Change-Id: I4ad9c972d7f76f7e20cf74d6fc3d1928b644a4f8
2016-07-23mncc_sock: use osmo_sock_unix_init() from libosmocoreVadim Yanitskiy1-52/+5
Since the osmo_unixsock_listen() was moved to libosmocore it would be better to use the library's implementation instead of reinventing the wheel again. Change-Id: Iacfc39b6214c24084438f8fe04d03952cdc9ebc2
2016-07-23gprs_gmm: remove duplicated start of T3395Alexander Couzens1-2/+1
The timer is already scheduled by gsm48_tx_gsm_deact_pdp_req(). Change-Id: I8203b939d2196f87b11c0f3b2b0ff481e572835c
2016-07-17SGSN: fix FCS calculation for encrypted framesDieter Spaar1-4/+10
Change-Id: I352bc9db0c17fff773788831c4389ec0a5a30af8 Related: OS#1582
2016-07-17dyn pdch: don't PDCH ACT if gprs mode is noneNeels Hofmeyr2-2/+16
Skip PDCH activation if the GPRS mode is 'none' at: * TCH/F_PDCH init after OML Enable (dyn_pdch_init()) * after TCH/F_PDCH is released, in TCH/F mode * in the T3111 error timer callback after a TCH/F_PDCH was released in error state Assert the GPRS mode in rsl_ipacc_pdch_activate() to make sure all callers check the GPRS mode. Closes: OS#1765 Change-Id: I970e5f9dbcb1c625209e914a4c7696294ed34e62
2016-07-17cosmetic: dyn_pdch_init(): flatten if-logic, add commentsNeels Hofmeyr1-12/+12
Prepare for upcoming addition of heeding gprs mode == none. Change-Id: Id0fe6f762ac863c4d4053841c7732d011aa8c561
2016-07-17SGSN: move cipher application to separate functionMax1-41/+42
Split out generation and application of GEA gamma into separate function which can be used for both encryption and decryption. Change-Id: I442f2ead57e40d9bcd24e7f1b261041371595360 Related: OS#1582
2016-07-16SGSN: encrypt/decrypt only necessary framesMax6-34/+51
According to 3GPP TS 24.008 § 4.7.1.2 some GMM frames are not supposed to be ciphered. Propagate information about the necessity for encryption between MM <-> LLC to ensure only proper frames are encrypted/decrypted/dropped. Change-Id: I0358905e60d1b182f75caec81bfcc72bbbbb2aa1 Related: OS#1582
2016-07-16SGSN: add preliminary support for GPRS encryptionMax6-31/+49
It is already functional enough to allow testing with real phones. However, note - there are several limitations in the current implementation: * only default value for IOV-UI is supported at the moment * AUTN-based key material is not supported Related: OS#1582 Change-Id: I8900b906693496e4e6b35be5a86937c58039ed9e
2016-07-16SGSN: split GEA key management from TLLIMax4-21/+38
Move GEA key from TLLI assignment into separate function. Change-Id: I8a0bc907072dc19cd9535a28b5252dc0f05357cc Related: OS#1582
2016-07-16SGSN: use unique AUTH REQ referenceMax5-8/+46
The A&C reference number specified in 3GPP TS 24.008 § 10.5.5.19 identifies particular request sent by network with the related response sent by MS. The value transparently copied from request to response by MS: the spec do not specify what exactly should be in there so we use rand() to decrease chance for collisions. Note: variable named 'rand' clashes with standard function rand() so it was renamed. Change-Id: I3638821a9b4a0532b28dbbb50faa30c4082579f6 Related: OS#1582
2016-07-13jenkins.sh: add --enable-iu matrix buildNeels Hofmeyr1-3/+14
Change-Id: Ida76f24d0b801fa609f3a128b3b912572cad4297
2016-07-13jenkins.sh: remove code dupNeels Hofmeyr1-52/+51
Have a bash function to build each dependency with the same commands. There is a tradeoff: having each dependency build with the same function means you can't easily tweak one of the dependencies. OTOH having a unified function means a) more readable script, b) that we're sure not to forget some steps and c) no need to do the same edit n times. Set the PKG_CONFIG_PATH globally. Also a tradeoff: if a future addition wouldn't need the same PKG_CONFIG_PATH, this would make things ugly. But that is actually quite unlikely, and the readability improvement is substantial. Use env variables to remember local paths. That means we always are sure to cd to the same absolute base path, which a 'cd ..' can't guarantee; also, we avoid possible typos for e.g. "$deps/install". Change-Id: Ib23f86c6cc1441d882de59bcdde5de87fa4e9fdf
2016-07-11osmux: Add negotiation state so race conditions can't disable osmuxDaniel Willmann3-5/+7
Without this commit it is possible that osmux is disabled again on links with high jitter. This happens when an MGCP response without X-Osmux header is received before the NAT receives an Osmux dummy frame from the other side. Ticket: SYS#2628, SYS#2627 Sponsored-by: On-Waves ehf Change-Id: Id624b0279aee5e2412059a10296ce7896e2d4628
2016-07-11SGSN: prevent starting with inconsistent configMax3-3/+18
Previously it was possible to start osmo-sgsn with "auth-policy remote" but without "gsup remote-*" which resulted in broken setup: no MS could perform GPRS ATTACH. Add consistency check to vty code to fix this. Related: OS#1582 Change-Id: Ie4296e7d99d7833f7d828b0196435ea81097cf6e
2016-07-09Make random MSISDN assignment optionalMax12-60/+141
Previously if subscriber was automatically created it got assigned random MSISDN number. Make it optional (defaulting to previous behavior) by adding following: * new optional no-extension argument for subscriber-create-on-demand vty command * db unit tests * vty test Note: using the db made with new code might result in subscribers with empty extension. Such subscribers cannot be deleted using old code. Make sure not to mix db versions or manually fix it by editing sqlite with external program. Fixes: OS#1658 Change-Id: Ibbc2e88e4722b08854ebc631485f19ed56443cbb
2016-07-09libbsc: skip channel state LCHAN_S_INACTIVE while handoverAlexander Couzens1-1/+0
The state is directly overwritten by the next function. Because there isn't any state transition, remove this state. Change-Id: I7f287692dbd559268fb5e61d81ac19e5dd4827eb
2016-07-04SGSN: move TLLI unassignment into separate functionMax5-20/+18
Change-Id: Ia4df145ab03ebcaad70a13601cff60c488a5de54 Related: OS#1582
2016-07-04SGSN: add vty config for choosing GPRS encryptionMax2-2/+32
Change-Id: I07d65205be1c75d59744426629ed04cf3cd99f79 Related: OS#1582
2016-07-01SGSN: force GSUP CN domain to PSMax1-1/+1
Always set CN domain in outgoing GSUP packets to PS to make it compatible with osmo-auc. Change-Id: Ia6ee2e55a41a8ea9e465d7df1b2b3559b553fca8 Related: OS#1582
2016-06-29Fix vty tests with subscriber deletionMax1-9/+11
Use correct vty command for subscriber deletion, adjust assertions accordingly. The error was cause by inconsistent syntax of vty commands for subscriber creation and deletion. Change-Id: I9b9376b4ac0ec066000545167de312ca4460493b
2016-06-24err log: tweak dyn pdch ack error loggingNeels Hofmeyr1-6/+6
Rather use gsm_lchan_name(). Change-Id: I0334484eaa6a2c0f25925042c9c3c1a4e3e78ca4
2016-06-24dyn PDCH: cosmetic: clarify lchan rel with assertion and commentNeels Hofmeyr1-1/+11
Change-Id: If3cc40022e8283daa991fffe4b6baa734303d8a5
2016-06-23debug log: log all lchan state transitionsNeels Hofmeyr1-0/+3
Change-Id: Ic70aca65b3796c90ba1a88ea67ac7a2ad9190b69
2016-06-23vty: show lchan summary: also show lchan->stateNeels Hofmeyr1-2/+5
Change-Id: If7ae92b8d501b51bbe8a165c223734e169a8bb97
2016-06-21dyn PDCH: enable PDCH only after release due to errorNeels Hofmeyr1-1/+6
In rsl_rx_rf_chan_rel_ack(), only activate PDCH when in NONE state. For the case of REL_ERR state, do the PDCH activation in the error timeout callback after T3111 is done. Change-Id: I4c55479b252a12039bb3d8c30a9cbf0199ca410e
2016-06-20typo in sgsn_testNeels Hofmeyr2-2/+2
(committing just to test gerrit, if it goes through it's still a valid change) Change-Id: I3291ea2da99cd7f0e2f340b0e6fd6022d088beb8
2016-06-18rm dup: use channel type names from libosmocoreNeels Hofmeyr6-18/+10
In gsm_lchant_name(enum gsm_chan_t), use the gsm_chan_t_names value strings from libosmocore instead of redefining the same strings. The list from libosmocore is also more complete, including CCCH and PDTCH. Add a todo comment to move to libosmocore. In consequence, libosmogsm linkage needs to be added to osmo-bsc_mgcp, mgcp_test, mgcp_transcoding_test and smpp_mirror, smpp_test. Change-Id: If65ee7c0619cbc0acb0a15045bd5a969442c93cc