9
0
Fork 0
Commit Graph

371 Commits

Author SHA1 Message Date
Neels Hofmeyr fd7a290b0c vty: skip installing cmds now always installed by default
Depends: I5021c64a787b63314e0f2f1cba0b8fc7bff4f09b
Change-Id: I0fc8142756040c98c1862ddb18a77a032f2a7143
2018-11-27 16:33:45 +01:00
Holger Hans Peter Freyther 1bf8a4e42a m3ua: Make connection non-blocking to not block other flows
Currently the connect is blocking leading to one bad connection
(e.g. to a black hole) blocking all other connections leading to
bursty traffic.

Change-Id: Idfca8acbce09176055da3e577566386e07d7a348
2017-10-23 11:55:28 +08:00
Holger Hans Peter Freyther bfa6d0703f build: Remove old left over from before libosmocore..
Change-Id: Id3c41595475dac06dcdf3a104570640349c8f8bf
2017-01-18 09:23:31 +01:00
Holger Hans Peter Freyther 9e0723fb6d build: Link -losmocore last to please Ubuntu linker
It seems that the Ubuntu linker is quite picky in where it is looking
for symbols. Link libosmocore (and as such talloc) last of the Osmocom
libraries. This could fix:

gcc -Wall -I/usr/include/ -I/usr/include/ -I/usr/include/ -I/usr/include/   -DNO_UNIPORTE -g -O2 -fdebug-prefix-map=/usr/src/packages/BUILD=. -fstack-protector-strong -Wformat -Werror=format-security  -Wl,-Bsymbolic-functions -Wl,-z,relro -o cellmgr_ng main.o mtp_layer3.o thread.o ipaccess.o pcap.o bss_patch.o bssap_sccp.o bsc_sccp.o bsc_ussd.o links.o msc_conn.o link_udp.o snmp_mtp.o debug.o isup.o mtp_link.o counter.o sccp_state.o bsc.o ss7_application.o vty_interface_legacy.o vty_interface_cmds.o mgcp_patch.o mgcp_callagent.o isup_filter.o -ltalloc -losmocore -ltalloc -losmogsm -losmocore -ltalloc -losmovty -losmocore -losmosccp -losmoxua  -lpthread -lnetsnmp -lcrypto
[   79s] /usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/libosmosccp.so: undefined reference to `talloc_free'

Change-Id: I94c87496ebffd41a6217d860b0ca4bed6ff2d24c
2017-01-18 09:13:43 +01:00
Holger Hans Peter Freyther 368e549a92 tests/vty: Add VTY tests to the osmo-stp
There seems to be issues with the write handling of the osmo-stp
and so far we did not enable vty tests here. Make it possible to
enable the tests, fix the VTY strings, change string to OsmoSTP.

Change-Id: I547fd4840d86ce16e8589fb63802dd7099781194
2016-08-15 13:36:25 +02:00
Holger Hans Peter Freyther f3afabe989 misc: Attempt to fix various 64bit compiler warnings
Change-Id: I4ed058aba15d9fdc22dde99d60df0aabd6585b75
2016-08-15 13:36:11 +02:00
Holger Hans Peter Freyther baaa66c445 mgcp: Address compiler warning and initialize
mgcp/mgcp_protocol.c: In function ‘mgcp_handle_message’:
/home/ich/install/openbsc/include/osmocom/core/logging.h:59:4: warning: ‘save’ may be used uninitialized in this function [-Wmaybe-uninitialized]
    logp2(ss, level, __BASE_FILE__, __LINE__, 0, fmt, ##args); \
    ^
mgcp/mgcp_protocol.c:368:15: note: ‘save’ was declared here
  char *elem, *save;

Change-Id: I28152373b043c8a5b55a83ac09dd7bafce4d2d66
2016-08-14 08:18:34 +02:00
Holger Hans Peter Freyther e0b626adc0 vty: Adapt the go_parent_cb and fix compiler warning
The return type changed from enum to int and it is time to catch
up with it.

vty_interface.c:108:2: warning: initialization from incompatible pointer type
  .go_parent_cb = ss7_go_parent,
  ^
vty_interface.c:108:2: warning: (near initialization for ‘vty_info.go_parent_cb’)

mgcp_ss7_vty.c:36:2: warning: initialization from incompatible pointer type
  .go_parent_cb = mgcp_go_parent,
  ^
mgcp_ss7_vty.c:36:2: warning: (near initialization for ‘vty_info.go_parent_cb’)

Change-Id: I8061df697daf79fa57b8313c15f6567ff152f4a5
2016-08-14 08:18:33 +02:00
Holger Hans Peter Freyther db3684ee61 logging: Fix logging after introduction of the early check
The introduction of a 'if + do {} while' lead to not being able to
return the result of the logging anymore. Just return.
2016-03-02 17:45:56 +01:00
Holger Hans Peter Freyther 72722c34b0 m3ua/sccp: Allow to skip T18/T20 TFP/TRA handling completely
For M3UA we already skip the link-test handling and there is no
point in waiting for management messages to collect routing info.
We already know where to send things. At first I tried to overload
the skip handling but it is better to just set the timer to 0 and
then move on.
2015-10-23 14:06:36 +08:00
Holger Hans Peter Freyther a41c992c12 m3ua: Make the link up timeout configurable on the system
Make it possible to set it. 10s seems to be a very reasonable
timeout. It should not really take much longer than that.
2015-10-09 14:48:05 +02:00
Holger Hans Peter Freyther e948224d44 m3ua: Start timer to wait for ASPAC_ACK
For M3UA we should have one time-out for operation we want and
then re-transmit it. As this is too much work right now create
a single timer that waits that after a connect the ASPAC_ACK
state will be reached.
2015-10-09 14:43:12 +02:00
Holger Hans Peter Freyther 2c33e2a81e ss7: Mark the link as down after the shutdown 2015-10-09 12:10:49 +02:00
Holger Hans Peter Freyther 1a1aa0c739 ctr: Count number of dropped messages
In case of back pressure we can not send messages quick enough
and will drop messages. Add a counter so we can count how often
this happened per link/linkset. The SCTP M2UA code is not changed
as we don't have a link in the hands and adding it is too risky
without tests (not all M2UA have a link index so some might not
have a link).
2015-10-04 15:24:27 +02:00
Holger Hans Peter Freyther 2f79ae9b66 ss7: Make the failure mode configurable
Try to make it clear that this is only for the IPA bridging
mode and not a general setting.
2015-09-21 16:52:03 +02:00
Holger Hans Peter Freyther b492e86e4f ss7: Allow to force the link down when the IPA conn is going down
For the "bridging" to IPA mode we can force the SCTP/M3UA connection
down. This way the remote STP will do a proper link fail-over
procedure instead of the STP throwing data away.

This is not configurable yet.
2015-09-21 16:43:20 +02:00
Holger Hans Peter Freyther 78f5060c62 ss7: Inform the application layer that a connection is down
This can be used to force one connection down while the other
is down. E.g. to force SCTP down when the IPA connection is
down as well.
2015-09-21 15:47:10 +02:00
Holger Hans Peter Freyther d5be846c92 sctp: Print the rc and the errno in case of an error
Print the errno and RC to give some kind of idea about
the error.
2015-08-30 22:55:54 +02:00
Holger Hans Peter Freyther c5950d7c60 vty: Avoid printing "ip (null)" in the saved config file 2015-04-21 13:08:35 -04:00
Holger Hans Peter Freyther e2aba7d0d0 vty: Remember forward-only of the ss7 application
We don't have regression testing here but this could be
the correct fix.
2015-04-21 13:06:34 -04:00
Holger Hans Peter Freyther 6a441c86fe m3ua: Make the traffic-mode configurable 2015-04-16 22:32:09 +02:00
Holger Hans Peter Freyther 71477e1342 m3ua: Send data on stream != 0
RFC4666:
 The DATA message MUST NOT be sent on stream 0
2015-03-24 21:14:18 +01:00
Holger Hans Peter Freyther 316168249f all: Use the libosmo-sccp version of mtp_level3.h 2015-03-24 19:24:22 +01:00
Holger Hans Peter Freyther ebdbc11403 m3ua: Use the MTP_READ_DPC/MTP_READ_OPC for using the right PC
Make the code work for both ISUP and SCCP and let the address
handling still be part of the linkset/mtp3 code.
2015-03-24 19:21:01 +01:00
Holger Hans Peter Freyther d1df399a97 m3ua: Implement link bring-up and sending/receiving of data
the opc/dpc for ISUP is currently wrong. The send/recv path
for actual SCCP data is not tested.
2015-03-24 18:53:21 +01:00
Holger Hans Peter Freyther 6a20bae1f9 m3ua: Implement connect and re-connect handling 2015-03-24 18:52:46 +01:00
Holger Hans Peter Freyther d2f21e0796 m3ua: Begin to create a m3ua client connection
Implement a basic M3UA state machine on a SCTP connection.
2015-03-24 18:52:45 +01:00
Holger Hans Peter Freyther 679a8d0b75 mtp: Allow to skip SLTM on links (e.g. m3ua)
For M3UA links we can't send SLTM messages but we can
assume that the link is fine. Add a flag that a link
can set in case SLTM should be skipped. The linkset will
then directly wait for routable DPCs and bring the
SCCP part up.
2015-03-24 18:41:45 +01:00
Holger Hans Peter Freyther bc4b0bbe12 mtp: Clean-up and remove the unused start routine 2015-03-23 17:16:22 +01:00
Holger Hans Peter Freyther 4fd82de1ba Port from libm2ua to libxua 2015-03-23 12:39:18 +01:00
Holger Hans Peter Freyther 1cedd4a599 debian: Add a start script for osmo-stp 2015-03-23 10:15:13 +01:00
Sylvain Munaut 9544ee2955 build: Replace deprecated INCLUDES with AM_CPPFLAGS
Thanks to mnhauke for the patch

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2014-12-22 22:36:17 +01:00
Holger Hans Peter Freyther b5f89891bf sctp_m2ua: Fix the byte order of the request flag for the StateConf
The ASP has not been looking at this value at all, fix the byte
order. On the other hand my ASP doesn't care about this either.
2013-06-28 19:35:30 +02:00
Holger Hans Peter Freyther fa48639adf sctp_m2ua: Fix the check of how many ASP for the same ident we have active
Currently this is only true for the same connection.

sctp_m2ua.c:195 Two active SCTP conns with 1.2.3.4 on 0x9c21cf0, 0x9c21cf0
2013-06-28 10:11:00 +02:00
Holger Hans Peter Freyther 4b750fb119 dtmf: Make the on/off time and transmit power configurable
Make it possible to configure the transmit power. These settings
will be in effect immediately (there is no lock between the two
threads but it is a read only).
2013-06-04 13:43:37 +02:00
Holger Hans Peter Freyther 3bb2a91cd8 dtmf: Add tone detection to the event handling
We get a trap for detected tones and then need to query them. Print
the detected characters for now and do not forward them yet.
2013-06-04 13:43:30 +02:00
Holger Hans Peter Freyther a26e6173b1 mgcp: Return 502 in case the endpoint is allocated.
When an endpoint is allocated we do not have enough resources to
connect it again and this situation is permanent as long as the
endpoint is connected.

Returning 502 might help some switches to release stale audio resources.
2013-05-23 09:59:25 +02:00
Holger Hans Peter Freyther e48231c539 dtmf: Check the tones that are put into the DTMF scheduler and reject a 0
Playing tones should be printable ascii characters, begin by checking
for NULL (as it happened before) as the first illegal tone. This is
an attempt to make the API more robust and detect errors more early.
2013-05-23 09:59:25 +02:00
Holger Hans Peter Freyther 9905b18811 dtmf: Make the API more robust and avoid inconsistencies
Because of the issue parsing the MGCP request a '\0' was added to
the queue. This lead to the dtmf scheduler believing that a play
was in progress while the playing code didn't play anything. This
lead to the queue to be stuck and nothing being played at all.

Return the number of tones that should be played and stop using
strlen on the tones.
2013-05-23 09:59:25 +02:00
Holger Hans Peter Freyther 6c981176ab dtmf: Improve the log message and print the number of messages queued
Print the number of log messages that are queued in the error message.
2013-05-23 09:59:25 +02:00
Holger Hans Peter Freyther cd062c8c66 mgcp: Initialize the tone to CHAR_MAX as this might not be a request
The RQNT message might not contain a 'S:' line with the actual tone
to play. Instead of calling the callback with the 0 as tone just leave
early.

Example:
X: 6B9519B88F0
R: D/[0-9#*](N), G/ft, fxr/t38

Merged from the OpenBSC development tree
2013-05-23 09:59:25 +02:00
Holger Hans Peter Freyther 4db78de76e patching: Add a VTY option to hardcode the assignment complete message
For some equipment it is the easiest to patch the assignment
complete message transported to the MSC. Add a VTY config to
enable this patching, create a testcase that tests that the
original message is truncated. The setting of the VTY option
has been manually tested. The entire system has not been end
to end tested.
2013-05-13 21:08:36 +02:00
Holger Hans Peter Freyther b566c79d82 patching: Get the struct ss7_application down to the patching routine 2013-05-13 18:18:02 +02:00
Holger Hans Peter Freyther 6553f1b5e9 msc: Create a copy of the message for the forward_only case
We need to create a copy of the messages before we forward it
to MSC. This is already done in the other code path.
2013-04-22 18:55:50 +02:00
Holger Hans Peter Freyther c4e5066d1d app: Mark the transport as started for the relay mode
This code could be shared with the STP setup code.
2013-04-22 17:58:34 +02:00
Holger Hans Peter Freyther d90834c42a app: Make it possible to enable the forward only code
This change was either never implemented or has been lost at
some point in time. Allow to pass SCCP messages un-modified through
the A-link.
2013-04-22 17:56:09 +02:00
Holger Hans Peter Freyther 052b8e8c95 bss patch: Remove stale printf from the code that broke the tests 2013-03-25 13:52:32 +01:00
Holger Hans Peter Freyther 511848c864 bss patch: Patch all slots with FR2 in the assignment request
* Patch all slots with the FR2 codec. This is the easiest way to
  patch the entire message.
2013-03-25 11:06:31 +01:00
Holger Hans Peter Freyther 30be65a2e8 bss patching: Add test cases for assignment and assignment complete patching
* Chosen Channel and Speech Version are both optional. Patch them
  separately if they are present.
* Add testcase for the assignment request patching.
2013-03-25 10:32:23 +01:00
Holger Hans Peter Freyther 49844e8deb msc_conn: Clear the write queue when the connection is dropping 2013-03-19 22:51:19 +01:00