| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
To be able to add some more tests, related to convolutional coding,
without duplication of code, the test logic was separated from the
conv_test.c into conv.c and conv.h.
Change-Id: Idbdc7e19cb9b9a36cd1fccd621cd858e87530d98
|
|
|
|
|
|
|
| |
Since we have automatic header generation, implemented in the
utils/conv_gen.py, it's time to use this feature!
Change-Id: I21caa4e433b2cc1861611e35350a9671da444c2a
|
|
|
|
| |
Change-Id: Iae830d716f01810972edbef14fc5383ac647d0ea
|
|
|
|
| |
Change-Id: Ie10c47ee952f253b1ba77ecf6e79f2c033545bc1
|
|
|
|
|
|
|
|
| |
In ctrl_cmd_parse(), fix missing check for not parseable ctrl type.
Fixup for Icd4e96dd9f00876cb70b43cfcf42ab4f10311b28.
Change-Id: I7f8055225e3ee04b2a723bae07b12c42618963a0
|
|
|
|
|
|
|
|
|
|
| |
Previously lapdm_datalink->entity->mode was dereferenced without
checking if correct entity is present. This might lead to
segfault. Check it explicitly before dereferencing, log error and
gracefully return if necessary.
Change-Id: I0361e3731e86712b415a370cab1128d611988f56
Related: OS#1898
|
|
|
|
| |
Change-Id: Ie38bae32372dc41e1902a8f6f0bc550ae515cfb8
|
|
|
|
| |
Change-Id: If9a6ecc4d6e2beaf716569e9a6053d73488e860b
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously *_REPLY and ERROR messages were not explicitly handled which
would lead to sending error in response to them which in turn would
prompt other party to send error as well which would result in infinite
cycle.
Handle it explicitly by logging message id and other relevant data.
Change-Id: Id96f3a2fc81fa4549f49556d83f062c6b2f59e28
Related: OS#1615
|
|
|
|
|
|
|
|
| |
Use value_string for enum ctrl_type instead of custom code. Add
corresponding unit tests.
Related: OS#1615
Change-Id: Icd4e96dd9f00876cb70b43cfcf42ab4f10311b28
|
|
|
|
|
|
|
|
| |
* remove unused ctrl_interface_connect() which is not part of public API
* add default read callback to osmo_ctrl_conn_alloc()
Change-Id: Iaa209e34a849ce0dfe2e29b482c3208ade1a32a4
Related: OS#1615
|
|
|
|
|
|
|
| |
It is in the public header file and allows to easily bind it from
other languages (without having to go through the abstraction).
Change-Id: I0128d529c52ec030cfb87b0aff3c69cadf2c59d2
|
|
|
|
|
|
| |
See OS#1958
Change-Id: I85aee0f8fdfc9c69d0ba9240988c633d3e707f2d
|
|
|
|
|
|
| |
it's osmo_sock_init_ofd(), not osmo_sock_init_ifd()
Change-Id: Ia6a82031a691403f641815862613d99b31a3a159
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add function for allocating CTRL connection to public headers and
replace call to previous static function with it. Add doxygen docs for
this function.
It's useful if we need to allocate ctrl connection but don't need to
bind to any interfaces: when we act as ctrl client.
Related: OS#1615
Change-Id: I522ed809cbebfd3d7dd08b4ed9137b39ff192e32
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
My recent logging patch was merged to master a bit too soon. Accomodate the
request for naming that matches the general "LOG" prefix instead of "LOGGING".
libosmocore will not be backwards-compatible with the few commits from
change-id I5c343630020f4b108099696fd96c2111614c8067 up to this one. This and
following commits are backwards compatible with those before that short window.
See also:
* openbsc change-id Ib2ec5e4884aa90f48051ee2f832af557aa525991
* osmo-pcu change-id I4db4a668f2be07f3d55f848d38d1b490d8a7a685
Change-Id: I424fe3f12ea620338902b2bb8230544bde3f1a93
|
|
|
|
| |
Change-Id: Ic459b04219abe70171c8f80ed09df53d412dcfb2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|