Commit Graph

2656 Commits

Author SHA1 Message Date
Harald Welte 640d72ab3b Add 'debian' directory containing debian packaging information 2010-08-24 15:33:04 +02:00
Harald Welte 2a90a25c93 Add gprs_sndcp.h to noinst_HEADERS 2010-08-24 13:59:08 +02:00
Holger Hans Peter Freyther e0009f10ca gsm48: Add method to send a separate facility message...
Send a facility messages with notifySS/CNAP as payload
to the phone... the function is not called from anywhere
in the tree yet but I use it locally.
2010-08-12 01:44:57 +08:00
Harald Welte c1fa794ed5 [GPRS NS] Fix memory leak in gprs_ns_sendmsg() error path
When gprs_ns_sendmsg() succeeds in sending the message, we free()d the
msgb after transmitting it on the socket.  However, if the NS-VC is
blocked or some other error condition exists, we returned an error
code but didn't free the msgb.

This resulted in an error leak which is now being addressed.
2010-08-09 21:15:40 +08:00
Holger Hans Peter Freyther 5508fe3320 mgcp: Add a vty command to free a given endpoint. 2010-08-08 16:39:57 +08:00
Holger Hans Peter Freyther 9e9392d5b3 mgcp: Use transient errors in more cases... 2010-08-08 16:24:48 +08:00
Holger Hans Peter Freyther e378cb1341 mgcp: Reduce the log level to debug for these calls. 2010-08-06 20:22:23 +08:00
Holger Hans Peter Freyther da340638fd nat: Do not report paging to every BTS... 2010-08-06 20:15:40 +08:00
Holger Hans Peter Freyther 7d47601a35 nat: In case the downstream fails on a CRCX, ask it to do a DLCX
If the CRCX is failing, we will send a DLCX downstream and the next
time the callagent tries to do a CRCX we will be more lucky. This is
for the case where we have an endp allocated.
2010-08-06 19:16:34 +08:00
Holger Hans Peter Freyther 39a97e24fb mgcp: Remember if the endpoint was allocated...
Do not use the CI_UNUSED to decide if an endpoint is allocated
but introduce a new flag. This way only the CRCX and free_endp
play with the allocated field.
2010-08-06 18:03:11 +08:00
Holger Hans Peter Freyther 869e38eced mgcp: Add a callback to inform the client that an endpoint got reallocated 2010-08-06 17:54:27 +08:00
Holger Hans Peter Freyther c2ff55475e nat: Use the state information for the callback. 2010-08-06 09:07:20 +08:00
Holger Hans Peter Freyther 5b2726e6b5 nat: Keep the state (CRCX,MDCX,DLCX) of the operation..
This will allow to have additional debug information and to
use the state inside the forwarding code.
2010-08-06 09:07:07 +08:00
Holger Hans Peter Freyther b84b5f61ac nat: Free the endpoint when we get an empty CI.
In case the BSC is sending us an empty/unused CI we have
a bug, but for now let us free the endpoint and figure out
which response we are getting.
2010-08-06 08:34:46 +08:00
Holger Hans Peter Freyther 4634013cde mgcp: Make the CI uint32_t all the way to avoid mismatch 2010-08-06 08:29:37 +08:00
Holger Hans Peter Freyther 9c31cfc3a2 nat: Provide information of when a msg does not contain a CI
When we fail to find a CI in a message that should contain it
then print the message so we can analyze the issue and improve
the code later on.
2010-08-06 08:19:05 +08:00
Holger Hans Peter Freyther 52ccf6a480 mgcp: Fix discovering the RTCP port with the more strict check.
If we have found the BTS and we receive data on the RTCP port
from the IP of the BTS we will set our RTCP port and forward it
to the network and hope it will be useful.
2010-08-06 07:49:57 +08:00
Holger Hans Peter Freyther 0d44eb6a24 mgcp: Determine the proto properly... 2010-08-06 07:49:57 +08:00
Holger Hans Peter Freyther e2170a9f03 bsc_msc: Remove the except code as it is wrong...
Remove wrong code that is luckily not called. We would end up
in a reconnect and attempt to bsc_fd_register the same socket
again. I am removing this part of the code as it is not used
and it would need to know if the fd has ever been registered
or not...
2010-08-06 07:49:57 +08:00
Holger Hans Peter Freyther 7fe2a3d293 mgcp: Add instrumentation code to find a possible port leak/bsc-fd corruption 2010-08-06 07:18:22 +08:00
Holger Hans Peter Freyther 414bf401c7 mgcp: Move the mgcp_free_endp into the right path for the CRCX failure 2010-08-06 07:05:13 +08:00
Holger Hans Peter Freyther 6f36e92cab mgcp: Fix a filedescriptor leak in case the bind is failing. 2010-08-06 03:00:17 +08:00
Holger Hans Peter Freyther 0e01d09500 mgcp: Enable the tap after configuring it... 2010-08-06 02:05:15 +08:00
Holger Hans Peter Freyther 260d6ed02c mgcp: Add a call tap feature to forward audio to another forward port
For debugging it is useful to forward (tee) UDP packets to another
system and use gstreamer to inspect the rtp stream. This is untested
code and might contain bugs.... and of course only tap your own calls.
2010-08-06 01:12:21 +08:00
Holger Hans Peter Freyther 6357a8e311 mgcp: Patch RTP packets again if that is allowed. 2010-08-05 20:08:22 +08:00
Holger Hans Peter Freyther a39ddd5654 mgcp: Get the for network/for bts flag right. 2010-08-05 19:35:44 +08:00
Holger Hans Peter Freyther ea97fbf1a1 mgcp: Be more strict on the source addr/source port of the bts
Once we have discovered the bts we will not accept data from
anything else. The call will drop if the BTS is changing the
ip address of the nat anyway.
2010-08-05 19:35:44 +08:00
Holger Hans Peter Freyther b97c50db0a mgcp: Only discover the bts once, the extra check got lost 2010-08-05 19:35:44 +08:00
Holger Hans Peter Freyther d5e6c2374b nat: Use the mgcp_config_alloc to have defaults initialized
Initialize the net_base properly and benefit from future
config changes but also reset certain defauls that we do
not want at the nat.
2010-08-05 19:17:25 +08:00
Holger Hans Peter Freyther f138f917ec mgcp: Allow to dynamically allocate ports from a range..
Allow to switch to a dynamic port allocator and not reuse
the ports for a long time... This should help with a crazy
network sending two streams at the same time.
2010-08-05 08:08:17 +08:00
Holger Hans Peter Freyther 1be9f2fddc mgcp: Allow to have a different port allocation mode 2010-08-05 07:20:09 +08:00
Holger Hans Peter Freyther 15e7389cf0 mgcp: Prepare to have different port allocation strategies. 2010-08-05 07:10:56 +08:00
Holger Hans Peter Freyther a3b46c9ac0 mgcp: Fix the signature of the change_cb to not carry the port. 2010-08-05 07:09:14 +08:00
Holger Hans Peter Freyther e602cd6988 mgcp: Separate recv from net/bts and remove autodetection
This allows a more strict check on the source of RTP messages
and we can more easily reject those. For the BTS without an ip
address we will also update the ip address.
2010-08-05 06:57:29 +08:00
Holger Hans Peter Freyther 1fc432984c mgcp: Move the loopback code into the common send as well. 2010-08-05 06:57:29 +08:00
Holger Hans Peter Freyther b615164d75 mgcp: Remove the receive code into a new method. 2010-08-05 06:57:29 +08:00
Holger Hans Peter Freyther 84e1c47f74 mgcp: Move the selection of the right source port to a new method 2010-08-05 06:57:28 +08:00
Holger Hans Peter Freyther 314584ab44 mgcp: Allocate a different port for the networking...
Use the right source port when sending the message.
2010-08-05 06:12:02 +08:00
Holger Hans Peter Freyther 196349dda1 mgcp: Rename the base port to bts_base as it will be used for the bts 2010-08-05 06:10:58 +08:00
Holger Hans Peter Freyther c49212778f mgcp: Move the bfd for rtp/rtcp into the port
Stop using the memset in the mgcp_rtp_end_reset as we
will reset the list pointers and then have a mess..
2010-08-05 06:10:58 +08:00
Holger Hans Peter Freyther bb89aa1430 mgcp: Make the function internal, only used by the init/config code 2010-08-05 06:10:58 +08:00
Holger Hans Peter Freyther 217d712012 mgcp: Rename the bind method to show it is only binding for the bts port 2010-08-05 06:10:57 +08:00
Holger Hans Peter Freyther f1a168dc20 mgcp: Only use early bind for the BTS socket.
Simplify the code by onlt allowing one way to allocate
a socket.
2010-08-05 06:10:57 +08:00
Holger Hans Peter Freyther 58ff219c85 mgcp: Attempt to separate the RTP/RTCP port for the Network and for the BTS
We plan to have two different ports for the network and for the
BTS to avoid detecting the BTS and to dynamically allocate the
port to have old data not go to a new socket.
2010-08-05 06:10:57 +08:00
Holger Hans Peter Freyther a17d701a70 mgcp: Group the state for bts/net into a struct and have two instances
Group the data that each end (network/bts) have into a struct and use
this struct throughout the sourcecode.
2010-08-05 06:10:54 +08:00
Holger Hans Peter Freyther 8b5772ebe4 mgcp: Remove the forwarding mode as it was not used. 2010-08-05 06:10:13 +08:00
Holger Hans Peter Freyther 7f8aec2b2b mgcp: Fix the payload_type... it broke in 7cdc62c012 2010-08-05 06:10:10 +08:00
Holger Hans Peter Freyther e66cac359e nat: Fix the spelling of that comment. 2010-08-05 06:04:13 +08:00
Holger Hans Peter Freyther 7cdc62c012 mgcp: Fix the reversed net/bts... which has not cause any issue.. 2010-08-04 22:21:40 +08:00
Holger Hans Peter Freyther c02f11a04f mgcp: Pass the whole endpoint to the patch method. 2010-08-04 22:20:34 +08:00