Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: I180d2ecbb266d9baf2a96017bab20760bb42812e
|
|
Change-Id: I113232bbeaa7a835871df7f9b883ba573d8a2534
|
|
From the STP point of view: In order to be able to route messages back
to an IPA client, we need to create a route at the time we have
successfully identified the AS for this client based on the name
presented in the IPA CCM ACK "name" field. Once the IPA client is
destroyed, the route must be deleted again.
With this commit present, we can have an IPA client (such as
osmo-bsc-sccplite) connect to OsmoSTP and exchange BSS[M]AP
with an M3UA-speaking osmo-msc. Basically, the STP reaches
the point where it can translate between IPA-style SCCPlite
and proper M3UA/SUA on the other side.
Change-Id: I901f06c5d0f2eae60f8d931215ed65190330ce66
|
|
When we receive a SCCPlite message from an IPA peer, it may simply
contain a SSN number but no point codes. Similarly to creating a fake
MTP routing label from override DPC and routing key OPC, we can also
add that point code information to the SCCP header. This way the rest
of the SS7 network can handle the message and route it accordingly.
Change-Id: I4a2ff063e3c060641b3fd181a1cd600da3ec568b
|
|
Change-Id: I5fb11075593696b110bfd3e0541e3aa790029903
|
|
Change-Id: I70b420fc2105bb6e486adecf9285fed2fb471f73
|
|
As IPA is a transport layer underneath SCCP, and we don't have MTP-level
OPC and DPC fields in it, we are using the "point-code override dpc"
feature for setting the pseudo-M3UA DPC on incoming Rx packets,
and we use the PC from the routing context as pseudo-M3UA OPC.
However, we were so far only storing this in the M3UA data header,
and not in the xua->mtp.{opc,dpc} members, which are consulted
during the routing decisions.
Change-Id: I5e2244620cd48f848382eb595ce59c6212069788
|
|
Change-Id: I4c42ee71eff4ee6aad8dce4156809adb041811a6
|
|
Avoid writing 'local-ip (null)' to the config file
Change-Id: Ie49f21afd6b29b8e4a3b16f3f18764fea856d196
|
|
So far, the config would log an error upon config parsing, and then continue to
use defaults, which is super easy to miss. On errors, return CMD_ERR_INCOMPLETE
to abort the program in a config parsing error.
Be fatal for re-using an already defined addressbook entry in another cs7
instance, and for having a too long addressbook entry name.
Though it is mixing in cosmetic changes, add "Error:" to the output and arrange
the erratic name to the end of the message, as is customary for error messages.
Related: osmo-bsc Ia4e58902a2d3757b266cf35ac89f256cfb8f0eec
Change-Id: I2f71b9c4dd30f919d2054da81283dd7035f44f60
|
|
It can be cumbersome to derive the ss7 instance needed to pass to
sccp_addr_name(), because struct osmo_sccp_instance is opaque and only
available in sccp_internal.h, within libosmo-sccp.
Add osmo_sccp_inst_addr_name() which derives the ss7 instance from the internal
knowledge of the osmo_sccp_instance struct. This can save calls to
osmo_ss7_instance_find() just to do some logging of an sccp address.
Naming: first I thought to pick osmo_sccp_addr_name2(), but for some of the
string composing functions, adding a 2 already means that it is identical but
using a second static buffer (to be used twice within the same printf).
Change-Id: I70ec5c8b42682a23f11a5820431c7e34e225709b
|
|
vty_install_default() and install_default() will soon be deprecated.
Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b
Change-Id: I185aa3a11cb63c893ed80f326f852bde95217321
|
|
The recent bug with chopped-off point codes in SCCP Address handling
has shown that this code could need proper test cases. This patch
adds a testsuite for SCCP address encoding and decoding.
Related: OS#2441
Change-Id: I612352736ab33462ca0dd97798a2c437eadccb86
|
|
Log errors in case the user provides global title indicators or
nature-of-address indicators that exceed the permitted value range
Change-Id: I493b7810bdc58e448f496565ded36f9dce2c1226
|
|
In osmo_sccp_addr_encode(), we accidentially truncated all point
codes to 10 bits, where in reality we should have truncated them to
14 bits: One 'f' was missing in the bit-mask.
Closes: OS#2441
Change-Id: Iad67b674b5b5fd41996aa898a131e98900842dd8
|
|
... and bail out + log an error.
Change-Id: I2a419343e55edad39c59e763d11046c5a439444d
|
|
libosmo-sigtran is using symbols from libosmo-vty, so make sure that
we explicitly link against libosmo-vty to ensure the dependency shows
up in `ldd` of the library.
Change-Id: I4d96612a0df5a1232ed8fe280c5d592f462ef7b1
|
|
If the user does not create an AS, but creates an ASP with a name
that is equal to the default name, then the simple client detects
that and trys to use this ASP. However, unfortunately it then
overwrites the settings of the ASP with the default settings.
If the detected ASP is not created by the simple client, use it,
but preseve the settings of that ASP.
Change-Id: I53d73059f804c3bbea6cb43dc73ad49a753b3b15
|
|
We can set the ASP's remote IP (i.e. where to reach osmo-stp), but so far the
only way to specify the local IP address to bind to can only be set from C code
(e.g. the simple client). Allow setting the local address via VTY.
For example, this is desired for the osmo-gsm-tester, to not use arbitrary IP
addresses.
Change-Id: I3f71897dfacafcf3126e51894d6ca756b02dcd7d
|
|
* BSSAP is 254 on both MSC and BSC side: Add missing define
* BSSAP-LE (LCS Extension) has 250/251, adjust name to add -LE suffix
Change-Id: Iccec75cfc0cf16bd717a9bd4606d1e772c332ccc
|
|
Change-Id: I579482f679cd43edfbe796a5806ef360335f1c55
|
|
The previous fix (I312caf9d54cedb02034e4ef88fdd2e6ad9ca1c34) caused the default
addresses to be discarded. Actually talloc_strdup() the default addresses to
use them if not NULL.
Change-Id: Ic8563ab272d5256a1b8ceefd5fee37da61e1bd26
|
|
The VTY definition for this command is flawed and breaks osmo-msc VTY tests.
The small problem is a stray '}' in the definition, the bigger problem is that
square brackets indicating optional arguments must not enclose more than one
argument.
Split up the command in several separate definitions with si arg, with ssn arg,
with both, and with neither.
If si and/or ssn are not passed, set them to zero.
See https://lists.osmocom.org/pipermail/openbsc/2017-August/011026.html
"optional vty items are stricter than expected"
Change-Id: Idc68bfae5457960a9eae5d9648586d6ce719ad68
|
|
A doc element is missing, which fails the VTY tests in osmo-msc at Change-Id
I5ae4e05ee7c57cad341ea5e86af37c1f6b0ffa77.
Change-Id: I16aa74244ed5332bdc1fddd538e17b86f62ec3b2
|
|
When the server (STP) disappears from a live SCCP client,
then the xUA default layer manager receives LM_E_SCTP_DISC_IND,
which is traversing retart_asp(). In there, we first terminate
the current instance of the layer manager FSM, and then re-initialize
the ASP to use the default layer manager using
osmo_ss7_asp_use_default_lm().
However, osmo_ss7_asp_use_default_lm() uses the presence of an
asp->lm_priv pointer as a sign that the old layer manager is still
running and attempts to terminate it - despite being terminated
just before in restart_as().
So let's simply remove the termination from restart_asp(), and
leave it to osmo_ss7_asp_use_default_lm().
Fixes: OS#2402
Change-Id: I062d3af17539de864b56d079fe9b8d76ad99cf1e
|
|
The asp->cfg.remote.host is allowed to be NULL in cases where the
localhost is used.
Check if asp->cfg.remote.host is NULL when writing the config file
and omit it when it is set to NULL.
Change-Id: I18f79cc4d4f1db8f2858e8e95098c5821d50594f
|
|
osmo_sccp_get_ss7() has the risk of a nullpointer dereference, when
sccp is NULL.
Return NULL when the sccp instance is NULL.
Add doxygen comment
Change-Id: I84d484e4441fd37443fff8c67e17df8fb15d5b2e
|
|
It is currently impossible to find out which SCCP instance handles
a particular user.
Introduce function to lookup the SCCP instance from a given SCCP
user.
Change-Id: I9562c4f1d00e2ebb3252c5dea598b643aa393719
|
|
Some of the functons in sccp_user.c have already
doygen comments on them.
Add doxygen comments for the simple client functions as well
Change-Id: I9143bdc54d729f9f50e69fe38cd1798e065f2497
|
|
The point-code is not checked in the beginning, only the ASP
checks the point code at a very late stage and fails in case
an invalid point-code is detected.
Remove the check in the ASP creation.
Add a new check after the SS7 initalization that checks the
point-code. If none is set, the default point-code will be
used.
Change-Id: I334d90e769bd9952f67c51b12a945f22bd268fa8
|
|
When the default IP addresses (remote or local) the respective
struct value should be set to NULL.
Fix wrong ?:-notation.
Change-Id: I312caf9d54cedb02034e4ef88fdd2e6ad9ca1c34
|
|
The simple client takes certain parameters (pc, ip and port
numbers) which serve as a fallback default in case the user
did not configure any suitable parameters via the VTY.
Prefix all default variables with default_ to make the
purpose clear to the API user
Change-Id: Id9e697e8b198e4f58a79e59aaf2e649e84a3eb63
|
|
Make sure that all values of the resulting sccp_addr are cleared to obtain a
clean PC+SSN address. Before this, gt and ip remained unset/random, e.g. in
osmo_sccp_tx_unitdata_ranap()
Change-Id: I37395169d364050e45e99793c495a9848a4f8601
|
|
The SG (signal gateway) requires an extra set of VTY commands in
order to be fully configurable. These VTY commands do not make
sense in a situation where libosmo-sccp is used to implement an
ASP (application server process).
Detect in which role libosmo-sccp is used by which of the VTY
initalization functions are called:
osmo_ss7_vty_init_asp() ==> ASP
osmo_ss7_vty_init_sg() ==> SG
Prevent writing back of SG specific configuration when in
running as ASP. Only write back the full parameter set when
running as SG.
Change-Id: I707bcd790f4c6d0f618e41163b51d2179ea3aeaf
|
|
The simple client (osmo_sccp_simple_client_on_ss7_id() and
osmo_sccp_simple_client) does not create a default route if
the user has already created an AS via VTY.
Check the presence of a default route independently of the
AS. If no default route exists, create one.
Change-Id: I7516fa5509bade4ba10e9d8eaa3e46cfe3696b3a
|
|
Change-Id: If5a56ec170d4e91ce070f6fa9c9cfe5bbc121186
|
|
Change-Id: I2e6d656871f952be8e719573fedf2154832841d7
|
|
Change-Id: I75c67d289693f1c2a049ac61cf2b2097d6e5687d
|
|
Adjust xua_test accordingly.
Change-Id: I93e0aa706867e7b1de7f7a6071e3c8af89772af0
|
|
osmo_sccp_addr_dump() just prints the raw values. In osmo_sccp_addr_name(), use
osmo_ss7_pointcode_print() and newly added RI, SSN and GT value_string[] to
print more human readable log output.
Change-Id: Ie1aedd7894acd69ddc887cd65a8a0df4b888838c
|
|
Allows to automatically set an RI in future change
I75c67d289693f1c2a049ac61cf2b2097d6e5687d
"sccp-addr vty: set RI to SSN_PC when setting a point-code"
Change-Id: I6e2f31b023b08cba2f2ee8234e6108efcaca41c0
|
|
Change-Id: I8c6b7188d004033e75e9c41f4a65c418d13a79c5
|
|
A previous patch added ss7_instance primary_pc validity checks by means of
OSMO_SS7_PC_INVALID. To be consistent, also adjust sccp_user accordingly.
(see I7f0f0c89b7335d9da24161bfac8234be214ca00c)
Remove the osmo_sccp_user's pc_valid field, replaced by pc=OSMO_SS7_PC_INVALID.
Adjust all code paths.
Simplify some log printing, using the fact that osmo_ss7_pointcode_print() now
outputs "(no PC)" for unset point codes.
Change-Id: I8684c9b559712072c772012890bbf7efa7c8eb35
|
|
Initialize osmo_ss7_instance.cfg.primary_pc = OSMO_SS7_PC_INVALID.
Adjust all code paths using primary_pc to ensure it is indeed valid.
Rationale:
It looks like we are going to use the primary point-code of an SS7 instance to
derive a local SCCP address, e.g. for osmo-bsc and osmo-hnbgw.
cs7-instance 1
point-code 1.2.3 ! sets osmo_ss7_instance.primary_pc = 1.2.3
sccp-address msc
point-code 0.0.1
routing-indicator PC
hnb
iucs
remote-addr msc ! derives cs7 instance 1 and local pc 1.2.3
If 'point-code 1.2.3' is omitted, this becomes '0.0.0' without the user
noticing, and this happens for each client that omits it. I would like to barf
when no local PC is set.
Change-Id: I7f0f0c89b7335d9da24161bfac8234be214ca00c
|
|
Introduce OSMO_SS7_PC_INVALID to mark an unset point code.
Add static osmo_ss7_pc_is_valid() (name matches schema of
osmo_ss7_pc_is_local()).
In osmo_ss7_pointcode_print(), return "(no PC)" if !osmo_ss7_pc_is_valid(), for
convenient printing of any PC state.
Subsequent patches will use this for
osmo_ss7_instance (I7f0f0c89b7335d9da24161bfac8234be214ca00c)
as well as osmo_sccp_user (I8684c9b559712072c772012890bbf7efa7c8eb35).
Rationale:
Currently, in osmo_ss7_vty.c we had "if (inst->cfg.primary_pc)" suggesting 0 is
invalid, but in struct osmo_sccp_user we have flag pc_valid suggesting 0 is
indeed valid. All known point code formats are <= 24bit, so we can easily use
0xffffffff as indicator for an unset PC, which removes the need to remember to
set a second field for validity and keeps the structs nice and lean.
Change-Id: Ib5715bf03a4de7713a7a809dfd821c700255ba8c
|
|
In order to catch invalid CS7 configurations, It is necessary
to check if sccp addresses contain plausible address data.
Change-Id: Ic6245288b0171eae10aa708403c1ddb584c92f38
|
|
Drop the separate osmo_ss7_set_vty_alloc_ctx() because we are likely to forget
calling it. Instead, incorporate into osmo_ss7_vty_init_*() with a new ctx arg,
and set the static context var in vty_init_shared().
Change-Id: Id4e7f47979001f7856b0b3665c9e94982e75e490
|
|
Will be used by e.g. osmo-hnbgw to add an SSN to addresses obtained from the
sccp address book.
Change-Id: I85b46269dbe7909e52873ace3f720f6292a4516c
|
|
The most important parts of an SCCP address are the routing
indicator and the pointcode. The latter one is always available
via the SS7 instance, so a basic local address can be derived
from there.
Add function osmo_sccp_local_addr_by_instance() to derive a basic
local SCCP address from a given SCCP instance
Change-Id: I371dc9132871aad3d8321ea13cf9fd69d76eff8f
|
|
check input parameters local_ip and remote_ip of the function
osmo_sccp_simple_client_on_ss7_id() before using them with
talloc_strdup()
Change-Id: I1a5dd1ea3167513bf9e7ae153f83e1ae3136c905
|