| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Those hex strings can then be copy+pasted into the OSmoNITB VTY
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
this fixes some compilation issues with libosmocore under NuttX,
particularly as some #defines are missing or some header files are
slightly different.
|
|
|
|
| |
... which it should have been all along.
|
|
|
|
|
|
| |
libosmocore.{so,a} should always have been GPLv2+. However, when
migrating some code from OpenBSC or OsmocomBB, we sometimes introduced
it with a wrong license header.
|
|
|
|
|
| |
Preprocessor flags are best placed in AM_CPPFLAGS. Remove use of the
unused all_includes variable, which is never set.
|
|
|
|
|
|
| |
the bits/crc files are not inside the sourcedirectory but will end
in the build directory. Go and look there as well. This somehow
doesn't fail with make distcheck but when building for Yocto Dizzy.
|
|
|
|
|
| |
When I wrote the gan.c, I used the wrong copyright/license header
(AGPLv3+ intead of GPLv2+). This was a mistake and is fixed hereby.
|
|
|
|
|
|
| |
Some source code files didn't have the usual copyright and licence
statement at their top. I'm adding them baesed on information in the
commitlog.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The element following the identifier list was the
GSM0808_IE_LSA_INFORMATION. It is a TLV type as well
and the issue got introduced in
92107dfd3b99ab0dbb0f4770286454ad94a36de2.
Fixes:
gsm0808.c:316:40: warning: initializer overrides prior initialization of this subobject
[-Winitializer-overrides]
[GSM0808_IE_LSA_IDENTIFIER_LIST] = { TLV_TYPE_TLV },
^~~~~~~~~~~~
gsm0808.c:315:40: note: previous initialization is here
[GSM0808_IE_LSA_IDENTIFIER_LIST] = { TLV_TYPE_TLV },
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
libosmo-abis is about forming A-bis interfaces/lines by means
of E1 or the IPA multiplex (or possibly other link layers).
The IPA multiplex is used in other contexts, such as the Control
interface, or the A interface. In that context, it makes sense to
have generic IPA related functions in libosmocore.
|
| |
|
|
|
|
| |
... used to be oml_{osmo,ipa}_magic in osmo-bts
|
|
|
|
|
|
|
|
|
|
| |
This adds support for A-over-IP and LCLS related message/IEI
definitions.
Old definitions are in decimal, which is very hard (at least for me)
to compare with the binary tables in the spec. Hex is much easier
to manually compare for completeness/correctness. I didn't touch
the existing definitions, but think they should move to hex, too.
|
|
|
|
|
| |
Submitted-by: Max <max.suraev@fairwaves.co>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
|
|
|
| |
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
|
|
|
|
|
|
|
| |
The code is lacking a "," at the end of a string and we ended up
doing string concatination instead of having an invalid state.
Fixes Coverity CID 1206564
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rename NM_ATT_O_REDUCEPOWER to NM_ATT_OSMO_REDUCEPOWER, which
makes it more clear that this is an osmcoom specific attribute.
Also, we cannot simply overload 0x01 as an already defined OML
attribute. The problem is quite simple: When we use abis_nm_att_tlvdef
during the TLV parse, 0x01 will match to NM_ATT_ABIS_CHANNEL,
which is defined as { TLV_TYPE_FIXED, 3 }.
So instead, we need to introduce a new abis_nm_osmo_att_tlvdef[],
which has to be patched into abis_nm_att_tlvdef[] by the means of
tlv_def_patch(), exactly how we do it for bs-11 and nanobts specific
attributes.
I'm using 0xfe for the attribute, as 0xfe doesn't overlap with the IPA
specific attribues (and we might want to combine/merge the 12.21 plus
IPA plus osmocom spefici attributes)
|
| |
|
| |
|
|
|
|
|
|
|
| |
If LAPDm receives an I-Frame while there already is an I-Frame in the
tx_queue the code generates an additional RR (to acknowledge the
received I-Frame). Instead, N(R) of the I-Frame in the tx_queue should
be updated to ACK the data.
|
|
|
|
|
| |
This API allows you to get the lapdm_datalink for a SAPI. It's needed in
the lapdm_test, so make it public.
|
|
|
|
|
|
|
| |
When debugging an issue that involves SAPI=0 and SAPI=3 the
log file does not have enough context. Add the SAPI to this
message so we at least understand which SAPI we are talking
about.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently it takes 3s to establish a SAPI 3 SACCH connection with
osmo-bts. This is due to the fact, that a broken SABME request is
sent first and and is ignored by the MS. Then, after a T200 timeout
(2s) the SABME command is sent again (this time correctly) and
answered by the MS.
The first SABME message is broken (it has a length field of 3 and
ends with 3 bytes from the tail of the original RSL message),
because of it is expected throughout lapdm.c that msg buffers
containing RSL have msg->l2h == msg->data. Some abis input drivers
fulfill this but IPA doesn't, thus the 3 bytes of the IPA header
are still part of the msg and confuse length computation.
Since internal fields of the msg are modified directly, this is
difficult to see.
This patch adds a new function msgb_pull_to_l3() that explicitely
skips over all headers prepending L3 and therefore resets l1h and
l2h. This function is then used instead of msgb_pull_l2h() which
only worked correctly when msg->l2h == msg->data. In addition,
code manipulating msg->tail and msg->len directly has been replaced
by calls to msgb_trim().
Note that this patch does not fix all issues of this case in the LADP
related code.
Ticket: SYS#192
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
| |
I saw this while playing with talloc pools and wondered why
lapd_core is creating a log_info. Use the right struct for
the array.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
Currently w[14]/w[15] and w[18]/w[19] are swapped in range 256 format
decoding in gsm48_decode_freq_list().
This patch fixes this.
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The legacy 7bit conversion functions (those without the '_n_' in the
name) gave wrong return values on 64 bit platforms due to unproper
signed/unsigned conversions and the usage of SIZE_MAX.
This patch fixes this by using a smaller max size (see
GSM_7BIT_LEGACY_MAX_BUFFER_SIZE, currently set to 64k) for the legacy
wrappers and by using unsigned int for max_septets.
In addition, there are tests now that check the return values of
legacy encoding and decoding.
Sponsored-by: On-Waves ehf
|
|
|
|
|
|
|
|
|
| |
abis_nm_pchan4chcomb will return a pchan for a given channel
combination but returned a value of the channel combination.
Fix it to return the physical channel combination.
Fixes: Coverity CID 1040767
|
| |
|
|
|
|
| |
simple copy into C from reversed code from www.hackingprojects.net
|
|
|
|
|
|
| |
Before the assigned value (0xFF) was truncated, reg->text[0] is of
type char. A corresponding test for the same value in openbsc could
only fail.
|
|
|
|
|
|
|
|
| |
This information element has been added to the MM Information
message in GSM24.008. This patch adds it to the tlv_definition
to keep the TLV parser from breaking.
Ticket: OW#978
|
|
|
|
|
|
| |
The number of digits is the number of used octets times two (two
digits per octet). The result has been successfully dissected by
wireshark. It has not been tested with real phones.
|
|
|
|
|
| |
The table structure is not intuitive, so this comment shall aid to
understand this.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The 7bit<->8bit encoding/decoding functions didn't check whether
there is still enough space in the destination buffer. Therefore a
buffer size parameter has been added to each of the functions which
is used to truncate the output if the buffer is too small.
In addition, the return value of the decoding functions has been
changed to number of characters written (excluding \0), so this
value is always equal to strlen(decoded).
The old functions are still available as wrapper functions.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
if (ptr)
msgb_free(ptr)
extends to:
if (ptr)
talloc_free(ptr)
And according to the talloc documentation a talloc_free(NULL)
will not crash: "... Likewise, if "ptr" is NULL, then the function
will make no modifications and returns -1."
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handling 7-bit coding is a little different for USSD, as TS 03.38
states:
To avoid the situation where the receiving entity confuses 7 binary
zero pad bits as the @ character, the carriage return or <CR>
character shall be used for padding in this situation [...].
If <CR> is intended to be the last character and the message
(including the wanted <CR>) ends on an octet boundary, then another
<CR> must be added together with a padding bit 0. The receiving entity
will perform the carriage return function twice, but this will not
result in misoperation as the definition of <CR> [...] is identical to
the definition of <CR><CR>.
The receiving entity shall remove the final <CR> character where the
message ends on an octet boundary with <CR> as the last character.
Jacob has verified the fix with fakeBTS and the wireshark dissector.
Fixes: OW#947
Reviewed-by: Jacob Erlbeck <jerlbeck@sysmocom.de>
|
|
|
|
|
|
|
| |
This is required for encoding the SMS header using the alpha numeric
rules.
Reviewed-by: Jacob Erlbeck <jerlbeck@sysmocom.de>
|
|
|
|
|
| |
This is required for osmo-bsc to parse Alcatel S-12 CIPHER MODE COMMAND
in osmo-bsc.
|
|
|
|
|
|
|
|
|
| |
lapdm.c takes the re-establishment message and forwards it to lapd_core.c,
so we can assume that msgb is set at primitive. In case there is data in
the re-establishment msg, it is moved into send_buffer. In case of no
data (0 length), it must be freed.
Fixes an issue spotted by Coverity Scan.
|