Age | Commit message (Collapse) | Author | Files | Lines |
|
It is possible to add two (or more) different
sccp-addresses under the same name, when the
addresses are defined in different cs7 instances.
Add a check to make sure an address name is not
used multiple times
Change-Id: I63227cd87bc24f7d9ac995430b869f0393818335
|
|
The function seems osmo_ss7_asp_use_default_lm() does not guard
against an asp->lm_priv FSM instance already existing. If this
function is called a second time, it will overwrite asp->lm_priv,
causing the original fsm instance to leaked.
Check if asp->lm_priv already exists and terminate (free) the
FSM if present.
Change-Id: I4ad435c042a435c4e641c6e5c53b91265dd23d40
|
|
The osmo_sccp_simple_client_on_ss7_id and osmo_sccp_simple_client
are not entirely configurable via VTY commands. The relation to
the VTY is implicit. The user may set up instance objects via
VTY (cs7/ss7, AS, ASP), which are then automatically created on
startup.
Each cs7 instance gets its own ID via the VTY configuration. When
osmo_sccp_simple_client_on_ss7_id() is called with the cs7 instance
id. (for osmo_sccp_simple_client() the ID will be hardcoded to 1),
the function automatically checks if the CS7 instance is present,
if not it will create one automatically using the caller supplied
parameters as a defult. If a CS7 instance is present, the function
checks for the presence of an AS and an ASP. These objects are
present, they will be used. If not, new objects will be created.
Both functions must not be called if an SCCP instance is already
present. Since there can only be one SCCP instance per CS7 instance,
this is an error condition.
Add additional logic that checks to detect an already existing, valid
configuration. If no or an insufficient configuration is detected,
use the caller supplied parameters as default configuration.
Change-Id: I293f3526ce6182dca74a169a23449dbc7af57c7c
|
|
The sccp-addressbook only allows defining addresses for a specific
ss7 instance. It is not possible to use an sscp-address, that is
defined in the one ss7 instance in another ss7 instance.
Add a second global list where all sscp-addresses are added,
regardless on which instance they are defined.
Fixup the search functions so that they always search the global
list.
Change the API, so that the address data is written to a
destination pointer. This protects the stored address from
unintentional changes. Also return the ss7 instance, where the
address is associated with.
Change-Id: I5acc1e5abc3b3081149a9f476038e4e53d23b763
|
|
The vty command string already says it all, remove the comment entirely.
Change-Id: I8ecad584a1bc9b97693b199abd1ec2e5f6ce156d
|
|
The installation of the vty commands for the sccp addressbook is
currently located in osmo_ss7_vty_init_sg(), which is normally
only used in signalling gateway applications. An ASP would lack
the addressbook functionality.
Make SCCP addressbook available for both SG and ASP
Change-Id: Ib49ab623055e9ada7f95e0163ba7e33c5f6f99cb
|
|
Following warning was being printed:
warning: statement will never be executed [-Wswitch-unreachable]
The code in there seems not to be finished, so better leave the code and a
pragma message to get notified when we compile.
Change-Id: I4e2c482803954c984cb6792b11b4ea0fe674e269
|
|
Change-Id: Ia93bb7d59e4e2c31b693e2c3424d34386762d02e
|
|
The result of osmo_ss7_pointcode_parse() is currently not
checked. This means that -EINVAL could end up as value
in the pointcode configuration.
Check the return code of osmo_ss7_pointcode_parse() and
exit the VTY command with CMD_WARNING if the returned
pointcode is < 0
Change-Id: Iae6d92b1d135063dfd0a26bc23a89802cb3b1a78
|
|
osmo_sccp_simple_client() and osmo_sccp_simple_server() are binding
on the ss7 instance with the id 1 by default. If the instance does
not exist, it is created automatically.
Allow choosing the ss7 instance by supplying the id number as
function parameter. Add two new functions:
osmo_sccp_simple_client_on_ss7_id()
osmo_sccp_simple_server_on_ss7_id()
Change-Id: I62e608253212415bddbb4c7dcf5d3b5e79c8d28e
|
|
This reverts commit 5527df78adc08b76df07c4b682263b5bdd6181d4.
I tried some time to figure out what other changes are needed to make this
commit work and fix a confusion, until I noticed:
The commit's *log message* is correct that SRC == calling, but the *patch*
modifies callED addr to be the SRC, which is wrong. So reverting this commit is
indeed the correct way to fix our addresses.
Change-Id: Ic76aacc81f87f8885fe04121aead5c79a761ef07
|
|
Change-Id: I98e400e297f8fa83037a8e74a936e4ecc137099c
|
|
Change-Id: Icfd45bcbecc440b94893db2aca537a162f210abd
|
|
Add function osmo_ss7_point_code_print2() to be able to print two point codes
in the same log message.
Change signatures of two static functions to aid logging:
add invalid ref arg to sccp_scoc_rx_inval_src_ref(),
pass conn instead of inst to sccp_scoc_rx_inval_opc().
Change-Id: Ia3243606d6cad7721f7da7f6caba2caa90ae2bbd
|
|
In osmo_ss7_route_create() as is only initalized if lset can not
be initalized. If lset can be initalized, as will not be used so
everything is fine. However, the compiler complains that as may
not be initalized. Initalizing as to NULL solves the problem.
Change-Id: Ibcb3ebf9aaa7717cb553242517abce1499bc9c2a
|
|
Change-Id: Ic97de20c567bf67c513a45060e1e96e4b67b2311
|
|
translate function is always present in the same file, thus we can
remove this check.
Fixes following warning:
warning: the address of ‘translate’ will always evaluate as ‘true’ [-Waddress]
if (translate &&
As requested by Harald, leave a comment there stating that there are some
checks missing and yet to be implemented. The translate function check
was used for this purpose.
Change-Id: I48a711f3a43496e2c0c637f34f56784f765938c4
|
|
SCCP addresses are defined through a number of compoinents, not
just an IP-Address, there is also point code, ssn and more. To
simplify and unify the handling of such objects, this patch
introduces an addressbook functionality. The user can set up
multiple addresses per ss7 instance and give them names. Later
that name can be used to reference the address at a later point
in the config. This means that the usage of sccp-addresses from
the programmers point of view boils down to a VTY function that
reads the string name of a previously defined address. The
programmer can then use the API to get a pointer to the SCCP
address struct and use it normally.
For this feature, two additional VTY nodes are necessary,
this commit depends libosmocore change:
Change-Id I42aa29c0cccc97f284b85801c5329b015b189640
Change-Id: I068ed7f7d113dab88424a9d47bab7fc703bb7942
|
|
Change-Id: I931ccf6f765d4fe916ea94bde704314561e4537c
|
|
SUA uses different semantics (source / destination) address, while SCCP
uses Calling/CalledParty. This leads to some confusion. At least in the
CR/CORE and CREF/COREF case, the CallingParty equals the SRC_ADDR.
Change-Id: I1c641aac7b53c6de7c4e369aaf3004523bd85936
|
|
SUA uses different semantics (source / destination) address, while SCCP
uses Calling/CalledParty. This leads to some confusion. At least in the
CR/CORE case, the CallingParty equals the SRC_ADDR.
Change-Id: I5a3c27b112148dd539f092cce7618b4f62fde73c
|
|
"(cur[1] << 8) & 0x3f" is always 0 regardless of the values of its
operands.
Change-Id: Ie47e632f4bca490baf4282dc5d55ee55ca7f1ae8
Fixes: coverity CID#166932
|
|
The 'user' argument to osmo_ss7_user_unregister() can be NULL, so let's
make sure we don't dereference it.
Change-Id: Ia34b181dcbcb179b2639e2f405364cc952069842
Fixes: coverity CID#166933
|
|
xua will always be NULL in one particular switch case of
scoc_fsm_conn_pend_out(), so let's use NULL directly rather than obscure
it though a variable that might be understood as this being non-NULL in
some cases.
Change-Id: Id6dc56442441489aefc706bcebc49197ca3dae1e
Fixes: coverity CID#166934
|
|
Change-Id: I3cdd0fbdffcbeeb68dbc979385de045220ea0b0c
Fixes: coverity CID#166939
|
|
While the SUA / SCCP2SUA code is ensuring that mandatory information
elements such as the user data IE in a CLD$ message, we might still have
current or future callers of sclc_rx_cldr() that don't comply with that.
So let's make sure data_ie is valid before dereferencing it.
Change-Id: I7c1010b0ac82ee0b7bd5e2c7413899695eae0070
Fixes: coverity CID#166940
|
|
Change-Id: I5f7551e49c1b4ea417bee3516da1b2ece5ee0699
Fixes: coverity CID#166941
|
|
While the SUA / SCCP2SUA code is ensuring that mandatory information
elements such as the user data IE in a CLDT message, we might still have
current or future callers of sclc_rx_cldt() that don't comply with that.
So let's make sure data_ie is valid before dereferencing it.
Change-Id: Ia102f6c4cd5c6c3f823cb219635c42b9a87765f8
Fixes: coverity CID#166942
|
|
We were using the 'xua' pointer before checkin if it actually is valid
Change-Id: I5cd3250afc0b787b78683cd8ab6b2512e0d5c69e
Fixes: coverity CID#166945
|
|
We had used + derefernced the 'prim' pointer before checking its
validity.
Change-Id: I0ca5026091e91926924b297f9342bda5f9fd38c9
Fixes: coverity CID#166946
|
|
When receiving an unknown primitive, we end up de-referencing an
unassigned/uninitialized pointer for 'conn'. Let's properly catch that
case and print an error message.
Change-Id: Id1f5f293ea9bce8601d45164be670a7062d91802
Fixes: coverity CID#166947
|
|
The missing break statement leads to an unintended fall-through which in
turn prints a wrong ERROR message.
Change-Id: I6618fa247b889d4162118278cd05dee85cf21899
Fixes: coverity CID#166948
|
|
Change-Id: Ied76c21e20332514c2ad364eea5fc17e24a3f4c6
Fixes: coverity CID#166943, CID#166980
|
|
RKM permits multiple routing key IEs to be inside a single Routing Key
Registration message. We were trying to handle this, but the counter we
used as array index into the 'newly_assigned_as' array was actually
always kept at zero.
Change-Id: I08a962d2f242cefb67fb2dc93818c1ed532e8990
Fixes: coverity CID#166991
|
|
Change-Id: I03c30a0d1e03ff56df80bdd1e8a7846142b6f79c
Fixes: coverity CID#166993
|
|
If for some reason we cannot resolve the file descriptor for a given
FSM, we shouldn't attempt to send data through it.
Fixes: coverity CID#167155, CID#167154, CID#167153, CID#167152, CID#167151, CID#167151
Change-Id: I8b1a676b653bcdad21cb7927d549f499950a2b73
|
|
Add missing libosmogsm dependency.
Change-Id: I6e5cf393ffe81c582966ca0e9479e6deeffa9280
Fixes: OS#2182
|
|
As an IPA SCCPlite message arrives without any MTP routing label, we
simply construct one artificially for all inbound IPA/SCCPlite packets:
* we set the SPC to the point-code of the routing key of the AS
(as this is the PC we route to this IPA/SCCPlite client anyway)
* we set the DPC to a point-code from a new vty config command
"point-code override dpc"
Change-Id: Id556398e1ded3e613cfde7ea8b71aff7a414ff90
|
|
The use of m3ua_msgb_alloc() from generic code is a bit ugly, but I
really don't want to introduce yet another msgb_alloc wrapper.
Change-Id: Ic6dc9a1e7bbed2e1f73395bd18b727fa7892e25b
|
|
When we disconnect a client, make sure that we always go through
xua_cli_close_and_reconnect(), which will make sure to notify the ASP
FSM using XUA_ASP_E_SCTP_COMM_DOWN_IND.
Change-Id: I6859b8549c8cbbe2e8279da0ede562387a066d04
|
|
This tries as good as possible to fit the IPA/SCCPlite stacking into the
existing SIGTRAN/SS7 code architecture/model. To the user, the IPA
protocol looks like yet another protocol on the same level as the choice
between SUA and M3AU. On the inside, things are obviously quite
different.
We need to handle TCP with IPA framing instead of SCTP for both server
and client. We also implement an alternative "ASP FSM" for IPA, which
takes care of the CCM handshake (ID_REQ/ID_RESP/ID_ACK/ID_ACK2) for both
client and server mode.
In server mode, we use the 'unit name' as identifier to look up the AS,
similar to how we use a routing context to look up the AS in the xUA
case.
We also have to bypass activating the default layer manager in the
simple client to make sure we don't run into even more complexity.
What's missing right now is some way to manually override/set the point
codes. As IPA/SCCPlite is missing any routing label, we currently
simply generate one with SPC=0/DPC=0, which will obviously not work in
most configurations.
Change-Id: I9098574cddeba10fcf8f1b6c196a7069a6805c56
|
|
So when we create a xua_server for SUA, we must make sure to create that
associated SCCP instance, if it doesn't already exist. End-user
programs probably normally call this during their initialization anyway,
but in something like OsmoSTP, we need to auto-create it.
Change-Id: Ib575763dbd00f5bd7bfbf48f227a8f5ef9528e2a
|
|
Found using sua-sgp-mtr-i-04 from Michael Tuexen's sua-testtool.
Change-Id: Iec5c8deb6cc48a1269fd85243c1350bafd1dd815
|
|
This was found by sua-sgp-mtr-i-03 of Michael Tuexen's sua-testtool.
Change-Id: I09e96a26d9f9398de07ab46cdc5af10b2ea5acc0
|
|
I don't think the order of messages is that important (and specified in
the RFC), but let's do this to make the m3ua-testtool case happy.
Change-Id: I2e150e941a6fcfd203944f5b20bd07c07193f44a
|
|
Depending on whether or not any ASP is INACTIVE, we need to go to
AS_INACTIVE or AS_DOWN after T(r) expiry in the xua_as_fsm.
Found by m3ua-testtool testcase m3ua-sgp-aspsm-o-003
Change-Id: Iad6b176a5c95a28fbd5ba437696c2e6e160bdb00
|
|
Higher-layer code shouldn't have to worry between client and server
difference. It just wants to close the underlying connection for a
given ASP - which it now can by means of osmo_ss7_asp_disconnect().
Change-Id: I36b089abd281b8edac8830fda2d8e57cc06cd0a7
|
|
For classic xUA this is not needed, as the server doesn't have to react
to establishment of the SCTP connection. The client will start with an
ASP_UP_REQ. However, in upcoming IPA support, the FSM will need to
react on this event.
Change-Id: Ib10914b27f8761ea44a0fdba96c045821223722a
|
|
Change-Id: Ib201f9f480f25ede0f26d4918007ff22fea28824
|
|
Change-Id: If82956317ec703341514ad81057eceb3d0714f47
|