| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Ie81e9dd9f9936a414e7cebb2bccffa6f42a302a7
|
|
|
|
|
|
|
|
|
| |
In the previous commit we deprecated ipa_ccm_idtag_parse() but
also removed ipa_ccm_idtag_parse_off(), for which I couldn't find
any users. However, legacy openbsc.git still uses this function,
so let's re-introiduce it in its original form.
Change-Id: Ibfe53b04340eb355c8bfb8453a2af1522a4b6baf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the past, the function ipa_ccm_idtag_parse() was used to parse
the payload of IPA CCM ID RESP packets. However, the function was
based on a possible misunderstanding of the message encoding, and
callers actually counted the first (upper) length nibble as part
of the header and passed a pointer to the second
(lower) length nibble of the first TLV into this function. As such,
it was unfixable, and had to be replaced with a new function called
ipa_ccm_id_resp_parse(). At the same time, we also add
ipa_ccm_id_get_parse() to parse the slightly different format of
the IPA CCM ID GET payload.
We can never be 100% sure what is "correct", as our understanding
of the protocol is entirely based on protocol analysis, without any
official documentation available.
This patch also introduces unit test coverage for both of the new
functions.
Revert "ipa: Add libosmogsm.map entry for ipa_ccm_idtag_parse_off"
This reverts commit 7f31c90b80c08fbfe2d84d70d397402fdb38b94c.
Revert "ipa: Properly parse LV stream of a ID_GET request"
This reverts commit f558ed4bb9c0f00997b8f97c2b251a574c1a64c4.
It introduced a function/behavior that was not originally intended:
The parse of IPA CCM ID GET (8bit length followed by 1 byte tag
and variable-length payload) instead of the IPA CCM ID RESP (16bit
length followed by 1 byte tag and variable-length payload).
Change-Id: I1834d90fbcdbfcb05f5b8cfe39bfe9543737ef8f
|
|
|
|
| |
Change-Id: I423a24c55c9b9aa6fc8f501df94fe54c71ee2b2b
|
|
|
|
|
|
|
| |
don't blindly trust the tag-length value in an IPA CCM ID GET
message. This could result in a remotely-triggered integer underflow.
Change-Id: I4723361e1094b358310541a7dc4c5c921c778a15
|
|
|
|
|
|
|
| |
fix for some spelling issues found by lintian
Signed-off-by: Thorsten Alteholz <osmocom@alteholz.de>
Change-Id: I69976ecae6939d9ff51bfe4ce7374890c6563b82
|
|
|
|
|
|
|
|
| |
Let's fix some erroneous/accidential references to wrong license,
update copyright information where applicable and introduce a
SPDX-License-Identifier to all files.
Change-Id: I39af26c6aaaf5c926966391f6565fc5936be21af
|
|
|
|
|
|
|
|
|
|
| |
libosmocore offers the ipa API as general IPA Multiplex, which is e.g. used for
GSUP in osmo-msc. Looking at talloc reports, it is confusing to see "Abis/IP"
as msgb comment, because osmo-msc does not have an Abis interface.
Rename to "IPA Multiplex" as a more general description.
Change-Id: I3714dd21707bec0c4bcd0871e6ee8ff32d56b125
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Considering the various styles and implications found in the sources, edit
scores of files to follow the same API doc guidelines around the doxygen
grouping and the \file tag.
Many files now show a short description in the generated API doc that was so
far only available as C comment.
The guidelines and reasoning behind it is documented at
https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation
In some instances, remove file comments and add to the corresponding group
instead, to be shared among several files (e.g. bitvec).
Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
|
|
|
|
|
|
|
|
|
|
| |
Especially for short descriptions, it is annoying to have to type \brief for
every single API doc.
Drop all \brief and enable the AUTOBRIEF feature of doxygen, which always takes
the first sentence of an API doc as the brief description.
Change-Id: I11a8a821b065a128108641a2a63fb5a2b1916e87
|
|
|
|
|
|
|
|
|
| |
It's a pity that even with this patch we still are fare away from having
the whole API documented. However, at least we have a more solid
foundation. Updates not only extend the documentation, but also make
sure it is rendered properly in the doxygen HTML.
Change-Id: I1344bd1a6869fb00de7c1899a8db93bba9bafce3
|
|
|
|
| |
Change-Id: I60f5d4982cd96ab29f9924ec11b46bf56fbfc346
|
|
|
|
|
|
| |
This gets us one step closer to fixing the embedded build
Change-Id: I3fc2639b6ade9ab138766987eceab7ec9498fdc7
|
|
|
|
|
|
|
|
|
|
| |
We are allocating a buffer on the stack without initializing it, and
then passing it into ipa_ccm_make_id_resp(). There is no real danger
from this, as the buffer is only uninitialized if num_ies is 0, but
let's memset() it for good style
Change-Id: If5761a47b8cba73ddcc02a88cfa5c87c1970c04e
Fixes: coverity CID#167040
|
|
|
|
|
|
|
|
|
|
| |
The ipa.c file already contained code to parse an ID RESPONSE into the
'struct ipaccess_unit', but it didn't so far contain code to put
together an ID RESPONSE packet based on that structure. Let's change
that with ipa_ccm_make_id_resp() and a helper wrapper
ipa_ccm_make_id_resp_from_req().
Change-Id: Icbcd8827a75fd5f3393351c1ca372de85275ad35
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: I69f2891a2bea6f87f079b6778aa01ee27a25001b
|
|
|
|
|
|
|
|
| |
Output more information in case of IPA protocol errors to make debugging
easier.
Change-Id: I7632d6e679e076bfbec9abc12da4a46cc27ccea1
Related: SYS#3028
|
|
|
|
|
|
|
|
| |
Include the headers mentioned by the manpage
ipa.c:346:9: warning: implicit declaration of function 'recv' is invalid in C99
[-Wimplicit-function-declaration]
ret = recv(fd, msg->tail, needed, 0);
|
|
|
|
|
|
|
|
| |
For some reason the structure is closer to be a LV (length
and value). The value is actually a tag but it is counted
inside the length. Introduce an overload of the parse function
to provide an offset for the length. This will be taken from
the returned length.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the ipa_send function returns -1 in one execution branch
to indicate an error and -EIO in another. This is not consistent and
can lead to a misinterpretation of the error code, since -1 is -EPERM
and in general, EPERM is not returned by write(2).
This patch changes the return code to -errno instead of -1 for the
case that write(2) fails for same reason. So -rc is always a sensible
error value if there is a failure.
Sponsored-by: On-Waves ehf
|
|
|
|
| |
... which it should have been all along.
|
|
|
|
| |
thanks to Holger for reminding me
|
| |
|
|
As we are breaking builds by moving functions from libosmo-abis to
libosmocore anyway, we might as well give functions more appropriate
names. ipaccess is a company, while IPA is the multiplex protocol, and
CCM is the protocol used for establishing identities on the IPA
multiplex.
|