| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 812ba6dc63a75c39678dd3fe652768e76bf63183
"logging: centrally define ctx and filter indexes"
Removed definitions, which causes older e.g. openbsc and osmo-pcu code trees to
fail to build against a newer libosmocore. Re-introduce the legacy definitions
to redirect to the new ones and re-establish backwards compatibility.
The GPRS_* constants used to be defined in gprs_msgb.h, but since that header
also includes logging.h, rather place the legacy shims in logging.h next to the
other ones.
Change-Id: I455bb1bb474d758af0fd5b6397f7e57260ad739d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
MSCR and CBQ3 are Release 1999 additions to the Control Channel Description IE
of SI3.
Assuming that no-one is using the spare bits, this will not cause any code
conflicts.
In the R99 struct, spare1 and spare2 are in different places, so rather rename
them to spare_1 and spare_2 to make sure we get a compiler barf *if* anyone
tries to use them with the wrong structure.
Adjust the spec reference to TS 44.018; TS 04.08 Figure 10.5.33 is replaced by
TS 44.018 Figure 10.5.2.11.1 which is right there in the named Section
10.5.2.11, so drop the explicit reference.
Motivation: the R99 Control Channel Description defines MSCR to indicate
whether the MSC is R99+ or not. To use UMTS AKA on GSM networks, we want to
indicate that our libmsc is capable of R99, like OsmoSGSN already does.
CBQ3 is merely added for completeness, no particular use case in mind.
Related: OS#1593
Change-Id: If87e07b5d04e1617155383e14c98d2125fdd0608
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is too easy for calling code to use the same filter and context indexes for
different filters and structs. For example, openbsc's IMSI filter and libgb's
GPRS_BVC filter both fall on index 1 even though there are plenty more indexes
to choose from. To alleviate this, have one central definition here, sort of
like ports.h does for VTY and CTRL port numbers.
Add static asserts to make sure the indexes fit in the available array and bit
mask space.
Calling code like openbsc.git and osmo-pcu need adjustments and/or should move
to using these enum values instead of their local definitions.
Taking this opportunity to also prepare for a split of struct gsm_subscriber in
openbsc into bsc_subsciber and vlr_subscriber with appropriate separate filter
index constants for both subscriber types.
Include previous LOG_FILTER_ALL in the LOGGING_FILTER_* enum, and replace its
use by (1 << LOGGING_FILTER_ALL).
Change-Id: I5c343630020f4b108099696fd96c2111614c8067
|
|
|
|
|
|
|
|
|
| |
Configure logging to be deterministic and add stderr checking to testuite.at.
However, exclude the thousands of message modification log lines from the log
to not have a huge test expectation file.
Change-Id: I0dd7112967a64a168556b62e5ec15107b7608ffb
|
|
|
|
|
|
|
|
|
|
| |
This would have caught the wrong expectation of AUTS' length fixed recently
(3a5ca647c531b7761dc6c555e5e0cabc972bd3ac).
Besides AUTS, add AUTN, RES, CK, IK which were also not tested yet.
Change-Id: I6fddf8d7ce97137b0a585d365807bcaf90a319d0
Related: OS#1593
|
|
|
|
|
| |
Related: OS#1593
Change-Id: If943731a78089f0aac3d55245de80596d01314a4
|
|
|
|
|
|
| |
The wrong expectation caused OsmoHLR to fail on Auth Sync.
Change-Id: I277fb3d407396dffa5c07a9c5454d87a415d393f
|
|
|
|
| |
Change-Id: Ie1d5881dda7a9b797d15e9e1eead8281a994d91e
|
|
|
|
|
|
|
| |
Setting the BVC log filter to NULL worked only if the NSVC filter was set,
use the proper constant instead.
Change-Id: Ic1cc268ed20700698c93d3ff8bf85cc0f01d3b1b
|
|
|
|
| |
Change-Id: Ic29b588b72893821d73fe90ecc16c6bf78d5a360
|
|
|
|
|
|
|
|
|
|
|
| |
Osmocom Authentication Protocol design document
is removed from libosmocore project as this
information has been included in the User Manual.
It is present in SGSN User Manual.
relates to OS#1874
Change-Id: I2d4dc608622a7484e67b15f930efc76e28285045
|
|
|
|
|
|
|
|
| |
This is particularly useful for hex dumps containing spaces found in a log
(e.g. osmo-nitb authentication rand token), which can now be passed in quotes
to osmo-auc-gen without having to edit the spaces away.
Change-Id: Ib7af07f674a2d26c8569acdee98835fb3e626c45
|
|
|
|
| |
Change-Id: Ic95ab00b57d54905a235109561c00419161cf4bc
|
|
|
|
|
| |
Change-Id: I1328c89ec8e908bf4b4d2c0a398690278369e0f5
Related: OS#1645
|
|
|
|
|
|
|
| |
socket.c still uses fprintf to output error messages. This commit
replaces the fprintf with proper LOGP messages.
Change-Id: Ia2993415d5f5c33ccd719af239ff59252d11b764
|
|
|
|
|
|
|
|
|
|
| |
This change makes the conv_gen application more interactive
and flexible, allowing to generate not only code definitions
but also the test vectors and header files in the future.
Moreover, it becomes possible to select exact code family,
such as GSM, GMR etc.
Change-Id: I0b476b00234c17f78b41d695cf3bfd13edb64c28
|
|
|
|
| |
Change-Id: I2773b3859a206f96fb8fa095d50a653d9eeb8d79
|
|
|
|
|
|
|
| |
FreeBSD 11.0 uses clang version 3.8.0 which spits various warnings
during libosmocore compilation. Let's clean this up a bit.
Change-Id: Ic14572e6970bd0b8916604fabf807f1608fa07e5
|
|
|
|
|
|
|
|
|
| |
in lapd_t200_cb() The RELEASE INDICATION is transmitted before
the MDL ERROR INIDCATION, this prevents the MDL ERROR INDICATION
from being sent because the RELASE INDICATION close to connection
eraly. This commit puts the messages into the correct order.
Change-Id: Iae74777138fc27828f511e3aa321d1981861f4a5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
when the lapd core is in state LAPD_STATE_SABM_SENT, and the
retransmission counter exceeds (link down) lapd_t200_cb() will
send an RELASE_INDICATION and an MDL_ERROR_INDICATION to L3.
This action is done before the state is processed. This seems
to be no problem with standard retransmission counts (n200),
but may cause timing problems that lead to deadlock states when
custom timer configurations are in use. (Ericsson RBS).
This commit moves the functions calls for sending the indications
mentioned above to the very end of the if branch to relax the
timing again. (See lapd_t200_cb())
Change-Id: I1c1beb3701b19744a3ce9946abca7767d20a0b6a
|
|
|
|
|
|
|
|
|
|
|
|
| |
osmo_fd_register() is used to register socket file descriptors,
after registering a socket, there is no way to test if the socket
is still registered or actually registered at all.
This commit adds a new function osmo_fd_register_check() that can
be used to check in advance, if the socket fd is registered,
before performing further operations.
Change-Id: I48ec7098d6bba586c81bf0d5c9088108e2c081c6
|
|
|
|
|
|
|
|
|
| |
Employ osmo_gettimeofday_override_* to take bssgp_fc_test off real time. The
jenkins build slave often failed the test based on sporadic time delays due to
server load and randomly rejected good patches. This patch ends that.
Change-Id: Ie5029b85c2a154554d75d7f9af49a3b93425fdd9
Related: OS#1809
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
milenage_gen_vec() has parameter ordering of (..., auts, rand_auts, rand).
osmo_auth_gen_vec_auts() has (..., rand_auts, auts, rand), but actually feeds
args in the same order, so that its rand_auts becomes auts, and its auts
becomes rand_auts.
Interestingly enough, API user osmo-gen-vec.c also adheres to this misordering
and in turn passes auts for osmo_auth_gen_vec_auts()'s rand_auts and vice
versa, so that it matches milenage_gen_vec().
So both the implementation (milenage_*) and the API user use the same ordering,
just osmo_auth_gen_vec_auts() and osmo_auth_impl{ .gen_vec_auts() } in-between
have the argument names swapped.
Any current user of this API would need to adhere to this swapping or will not
get successful AUTS resolution to a SQN. So the least impact fix is to rename
the args without any actual functional change.
So swap the names rand_auts and auts for osmo_auth_gen_vec_auts() and
osmo_auth_impl{ .gen_vec_auts() }. (Also adjust API doc ordering)
Change-Id: I0dcbd49759fc32d3b8974102dbd1d6703364ebf4
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the -h help output, list the names of available algorithms.
In case of option parsing failure, also print help() (so that e.g. for a typo
in the algorithm, the list of algorithms is printed along with the error
message).
If there are -2/-3 or -a missing, show an error message that explains this.
Change-Id: I76732b28d7a553a6293d1707fe398d28b5ef4886
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When calculating a re-sync vector using AUTS, osmo-gen-vec used to print
SQN.MS + 2, the new SQN after vector generation, labeled 'SEQ.MS'.
Firstly, s/SEQ/SQN.
Secondly, print SQN.MS as umts.sqn - 2, which is the actual SQN recovered from
the AUTS. As explained in the comment, SQN.MS + 1 is used to generate the
vector, and then umts.sqn is increased a second time to indicate the next SQN.
With AUTS calculated from SQN.MS == 23, the output was:
AUTS success: SEQ.MS = 25
Output now:
AUTS success: SQN.MS = 23, generated vector with SQN = 24, next SQN = 25
Change-Id: I881bbe8246a5e7d3a5065b4b5b533255723b1a9e
|
|
|
|
|
|
|
|
|
| |
The debug output of lapd core has no references to the dl objects,
since we have multiple links, seeing which action is for which
object is impossible. This commit adds pointer references (dl=%p)
to each log line.
Change-Id: I3024d1cbd58631e2abac4ce5822528e2e6e15fda
|
|
|
|
|
|
| |
According to 3GPP TS 24.008 9.2.3a, 9.2.3, 10.5.3.6
Change-Id: I745061ce8eb88aa23080dadcdbfe2d703c362a30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
GSUP transmits AUTS for UMTS authentication procedures, and OAP uses the same
procedures to authenticate. osmo-gen-vec is a utility program that passes AUTS
to our osmo_auth_gen_vec_auts() API.
According to 3GPP 33.102 6.3.3, AUTS = SQN^AK || MAC-S, which are 6 || 8 == 14
bytes. This is confirmed by 24.008 9.2.3a where the TLV has 16 bytes, TL = 2
and AUTS being the V = 14.
It is not harmful for milenage_gen_vec_auts() to pass two more AUTS bytes. But
writing 16 bytes to a GSUP struct is a potential problem when passing in a 14
byte long AUTS buffer to the GSUP API, which then reads past the AUTS buffer.
The API implies the length, so far to be 16, so passing in a 14 byte buffer to
GSUP would require copying to a larger buffer first.
Fix this by using a length of 14 for AUTS everywhere instead.
This constitues an ABI breakage, we may handle it as a "fix before an official
release", otherwise we need a version bump.
The OAP protocol document has also been updated, needs an update in the
osmo-gsm-manuals as well.
Change-Id: If25b173d9ec57ea4c504d860954912b7d82af455
|
|
|
|
|
|
|
| |
It is still too easy to forget syncing, so add another reminder at the end
of the list.
Change-Id: I95191906afa8e6ada31310d0e36de33e3fccf268
|
|
|
|
| |
Change-Id: I08cb52d9399a27e6876e45da36f434708c4fddef
|
|
|
|
|
|
|
| |
Using this function, one can obtain a human-readable string identifying
the host and port names of the socket.
Change-Id: Ib5de5c7b9effe1b0a363e4473a7be7fa38ca6ef3
|
|
|
|
|
|
|
| |
Add special cause for alerts produced by external processes.
Change-Id: Idd7ee085321f8172c72ecfdba320186049f4d988
Related: OS#1615
|
|
|
|
|
|
|
|
|
|
|
|
| |
A DSO should link to the libraries that it is using. Linking to
libtalloc will resolve these warnings:
Change-Id: I4c8d5e80e194b9d9b4fa2424c4a22377ecee9c7a
dpkg-shlibdeps: warning: symbol _talloc_zero used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries
dpkg-shlibdeps: warning: symbol _talloc_free used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries
dpkg-shlibdeps: warning: symbol talloc_strndup used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries
dpkg-shlibdeps: warning: symbol talloc_strdup used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries
dpkg-shlibdeps: warning: symbol _talloc_memdup used by debian/libosmosim0/usr/lib/i386-linux-gnu/libosmosim.so.0.0.0 found in none of the libraries
|
|
|
|
| |
Change-Id: I69f2891a2bea6f87f079b6778aa01ee27a25001b
|
|
|
|
| |
Change-Id: I911c7f4bcadde414ce0b384e13a3a9a4a953e2fb
|
|
|
|
|
|
|
| |
We don't have file-based I/O nor ethernet devices with mac addresses
when building for OsmocomBB.
Change-Id: I01a9e6d8dbe885dbeac2769b84931a4d44f7a3a5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After subchan_demux.c in libosmo-abis, osmo-bts/common/vty.c and openbsc's
gtphub_test.c, more places would like to count the llist items (mostly unit
tests). Instead of proliferating numerous local implementations, add here.
NOTE: other than the previous llist_len() implementations, this one returns an
*unsigned* length, which might need some adjusting of current callers.
Call this llist_count() rather than llist_len() to highlight the fact that this
is actively iterating. This also avoids a potential naming conflict when
library versions mismatch.
Change-Id: Ic49adc7a346f5722bf624d7d3b4a735e4220ae15
|
|
|
|
| |
Change-Id: If56b521429af497ddd5a47170eb2c085b1fb78ba
|
|
|
|
|
|
|
| |
osmo_strlcpy() was excluded from the group because the closing brace was above
it.
Change-Id: I6701261f5854342ac4cd4f2da62e49eb40362938
|
|
|
|
|
| |
Change-Id: I71413fbe703e459782a235e5b1d8487265de3780
Related: OS#1615
|
|
|
|
|
|
|
|
| |
* make DEBUGP* macro into simple wrappers around LOGP*
* deprecate unused logp() function
Related: OS#71
Change-Id: Ia6c92bd4824c44fc22cc733ce7a88da86e58ed93
|
|
|
|
| |
Change-Id: I73ab4614c5c23390862d3ecaa2561a6749604a15
|
|
|
|
| |
Change-Id: I1a3a48bba9ee32a0bacc0b05d25358496dbcbc1b
|
|
|
|
|
|
|
|
|
| |
Similar to CTRL_CMD_DEFINE_RO() add helper for control commands which
are not meant to be read, only to set. Similarly, add
CTRL_CMD_DEFINE_WO_NOVRF() for commands which do not perform inbound
data verification.
Change-Id: I66b7990db590c1f8e56326e392e6c1d2eafebd9a
|
|
|
|
|
|
|
| |
Mark abis_nm_debugp_foh() function superseded by macro with the same
name as deprecated.
Change-Id: I2d3ea2b56aff6b687f72f832360b8cb8a24164e9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function pointer expects the last arg as int64_t, stats_test.c uses
an int instead. Fix the argument type as well as the printf format for it.
Fixes this compiler warning seen on our FreeBSD build slave:
CC stats/stats_test.o
../../tests/stats/stats_test.c:288:18: warning: incompatible pointer types assigning to 'int (*)(struct osmo_stats_reporter *, const struct osmo_stat_item_group *, const struct osmo_stat_item_desc *, int64_t)' from 'int (struct osmo_stats_reporter *, const struct osmo_stat_item_group *, const struct osmo_stat_item_desc *, int)' [-Wincompatible-pointer-types]
srep->send_item = stats_reporter_test_send_item;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
Change-Id: I91cbfd4dd25a881b803943430101dabf07dafc7c
|
|
|
|
|
|
|
| |
Stating that it 'truncates src' is misleading. Also clarify whether siz
includes the space needed for the terminating NUL.
Change-Id: I01c1a94408b471f7f54576178a60938bf9ee3261
|
|
|
|
|
|
| |
uint32_t may or may not be unsigned int.
Change-Id: I21c96985fcbb72372b6df949301c21f1ebca41f2
|
|
|
|
|
|
| |
In EMBEDDED builds we don't have a system-wide talloc
Change-Id: Icc526016bda45b36e584afee8669996752d6d89c
|
|
|
|
|
|
|
| |
The EMBEDDED conditional is used for building inside 'bare iron'
embedded devices like OsmocomBB phones. There's no PC/SC in them.
Change-Id: I2ef7561d7fdb1ef1c060f8ac73d8588fc0f8eb3f
|