Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2010-06-15 | [nat] Do not access the con after the removal | Holger Hans Peter Freyther | 1 | -3/+15 | |
In case of a RLC message we will destroy the SCCP connection. This means that accessing the con and con->bsc will access old memory. Keep the status local and move the con into an inner scope. | |||||
2010-06-15 | [nat] Send a GSM48 message within the reject message | Holger Hans Peter Freyther | 1 | -1/+19 | |
2010-06-15 | [nat] Move the SCCP CREF handling into a new method. | Holger Hans Peter Freyther | 1 | -7/+17 | |
We will need to generate messages with a proper reason and it is easier to do that from a dedicated method. | |||||
2010-06-15 | [nat] Use and print the connection type of a SCCP connection. | Holger Hans Peter Freyther | 1 | -0/+1 | |
2010-06-15 | [nat] Set the connection type/reason as out parameter | Holger Hans Peter Freyther | 1 | -1/+2 | |
We are analyzing each CR message and it is nice to know the reason these connections were created. Change the nat method. | |||||
2010-06-15 | [nat] Mention where the MSG is coming from. | Holger Hans Peter Freyther | 1 | -1/+1 | |
2010-06-15 | [sccp/nat] Make it optional to send data on a SCCP Connection Refuse | Holger Hans Peter Freyther | 1 | -1/+1 | |
This can be used to send a Location Updating Reject down to the BSC when it is clear that a subscriber is not allowed. | |||||
2010-06-15 | [nat] Separate exit2/exit3 as this can not be shared... | Holger Hans Peter Freyther | 1 | -1/+6 | |
We have tried to send a refuse for arbitary things and ended up with a segfault... separate the exi2 and exit3 label to have separate exits and cleanups. | |||||
2010-06-15 | [nat] Add a token to the nat config and handle ID GET | Holger Hans Peter Freyther | 1 | -3/+16 | |
This allows to chain a nat with a nat by answering to the id get code and sending the token. | |||||
2010-06-15 | nat: Introduce a nat filter that is working on the CR message. | Holger Hans Peter Freyther | 1 | -0/+10 | |
Currently there is no implementation but the refusal code is in place and will send a refusal back to the BSC. | |||||
2010-06-15 | abis: Pass the abis_om_obj_inst in the nm_state_event.. | Holger Hans Peter Freyther | 1 | -1/+2 | |
2010-06-15 | nat: Have a recycle timer that removes unconfirmed SCCP connections. | Holger Hans Peter Freyther | 1 | -0/+32 | |
The MSC does not respond to a SCCP CR with Paging Response as GSM payload, when the response comes in 'too late'. Prevent the MUX having stale connections and start removing old connections every 20 minutes. | |||||
2010-06-15 | nat: Print the MSC status with a new vty command. | Holger Hans Peter Freyther | 1 | -15/+14 | |
2010-06-15 | nat: Using the right fd can be a good idea as well | Holger Hans Peter Freyther | 1 | -1/+1 | |
2010-06-15 | nat: Fix bad bug, make sure the fd is not overwritten.. | Holger Hans Peter Freyther | 1 | -11/+11 | |
The adding of the innocent looking code was actually overwrote the fd and then stupid things happened. Rename variables to avoid that. rc,ret should be scratch variables... | |||||
2010-06-15 | nat: Use TCP_NODELAY for the connection to the BSC. | Holger Hans Peter Freyther | 1 | -1/+7 | |
We do not want to use NAGLE for the BSC connection. | |||||
2010-06-15 | nat: Improve log messages. Refer to ip and fd. | Holger Hans Peter Freyther | 1 | -3/+6 | |
2010-06-15 | nat: Make ping/pong timeout configurable. | Holger Hans Peter Freyther | 1 | -3/+6 | |
2010-06-15 | nat/bsc: Send PONG on PING, send PING from the BSC too | Holger Hans Peter Freyther | 1 | -5/+18 | |
We do want to send PING/PONG in both ways to have a heartbeat on the TCP connection. When switching over to SCTP we can rely on the builtin heartbeat functionality. | |||||
2010-06-15 | nat: Send a IPA PING down the stream and wait for the pong. | Holger Hans Peter Freyther | 1 | -0/+55 | |
We will send a ping every 20 seconds and if we have no pong within 5 seconds we will close down the BSC connection and wait for a reconnect. We will start this after having authenticated the BSC and we stop the timer when destructing the BSC connection. | |||||
2010-06-15 | nat: Do not allow a BSC to send auth messages twice. | Holger Hans Peter Freyther | 1 | -0/+6 | |
2010-06-15 | nat: Improve log message and refer to the BSC that was lost. | Holger Hans Peter Freyther | 1 | -2/+6 | |
2010-06-15 | nat: Report some more contexts | Holger Hans Peter Freyther | 1 | -1/+11 | |
2010-06-15 | nat: Add a command to close a given BSC Connection | Holger Hans Peter Freyther | 1 | -5/+4 | |
This can be used to clear stale connections for a given BSC or to force a reconnect of the BSC. | |||||
2010-06-15 | nat: Allocate a named context to make dumping allocations possible | Holger Hans Peter Freyther | 1 | -0/+2 | |
This is fixing the SIGUSR1 to really report the allocated memory on stderr. | |||||
2010-06-15 | nat: Only close connections that were fully connected | Holger Hans Peter Freyther | 1 | -1/+2 | |
Remember that we have seen a CC and have a valid destination local reference now and only send a fake RLC to the MSC when we had connections in this state. | |||||
2010-06-15 | nat: When having a proper close down, or a short read close the connection | Holger Hans Peter Freyther | 1 | -9/+8 | |
For now close the connection when having a short read. This might be due a network issue (loss of segment) or similiar. As we are not handling these issues well, let us close the connection. | |||||
2010-06-15 | nat: Handle all queueing to the MSC through the same function. | Holger Hans Peter Freyther | 1 | -16/+12 | |
2010-06-15 | nat: Change MGCP DLCX handling and send dummy MDCX to the BTS. | Holger Hans Peter Freyther | 1 | -1/+1 | |
When setting a new MSC timeslot to a SCCP connection check if any of the existing connections have this timeslot, if so we will send a DLCX down the stream to make sure it is closed there, when we will CRCX this new timeslot we will happily reallocate it. When the SCCP connection goes away, or we get a DLCX from the network, or the BSC is gone we will send a DLCX message down the stream as well. When we receive a CRCX from the network we will forward the CRCX as usual and send a dummy MDCX after it. For the DLCX and the dummy MDCX we send a custom MGCP message that will not provoke an answer. Even if the downstream MGCP GW will answer we will ignore it due the dummy transaction id that is not used anywhere else. This change should make sure that we close the dowstream endpoint all the time, even when the DLCX arrives after the SCCP connection is torndown. | |||||
2010-06-15 | nat: Move the write queue init to the allocation function | Holger Hans Peter Freyther | 1 | -1/+0 | |
This is required for unit tests that want to queue messages and see if we can provoke a memleak. | |||||
2010-06-15 | nat: Clear the queued messages at the end | Holger Hans Peter Freyther | 1 | -4/+5 | |
It is possible that the calls from the loop would queue more messages for the BSC and then we would have a nice memory leak... Move it to the bottom. | |||||
2010-06-15 | [nat] Degrade the message to a plain debug output. | Holger Hans Peter Freyther | 1 | -1/+1 | |
2010-06-15 | [nat] Add option to forbid the paging to the BSC. | Holger Hans Peter Freyther | 1 | -1/+3 | |
This can be done for testing purposes and to allow making a BTS crash that can not handle paging requests properly. | |||||
2010-06-15 | [nat] Lookup by BSC Connection otherwise the point of reassigning the is ↵ | Holger Hans Peter Freyther | 1 | -3/+3 | |
defeated When sending a MSG to the MSC try to find the to be used "src" reference by comparing the reference on the BSC and the BSC connection. Only this tuple needs to be unique. Actually only when looking at the SRC REF we need to compare the BSC as the dest reference should be unique but we are just making the check a bit stronger to make it look symmetric. | |||||
2010-06-15 | [nat] Slightly improve logging.. | Holger Hans Peter Freyther | 1 | -1/+2 | |
If we find the connection of a different BSC at least log the BSCs that had duplicated references. We should also dump the src ref and such but i am not doing this right now. | |||||
2010-06-15 | nat: Increase the right counter on calls. | Holger Hans Peter Freyther | 1 | -1/+1 | |
2010-06-15 | nat: Print the LAC that was searched for and not found. | Holger Hans Peter Freyther | 1 | -2/+4 | |
2010-06-15 | nat: Mention when we do not find a BSC for a given token. | Holger Hans Peter Freyther | 1 | -1/+3 | |
This might help to identify what is wrong with the config of the BSC. Also using the result of TLVP_VAL as a char pointer looks suspicious... | |||||
2010-06-15 | nat: Print the IP address of the BSC that does not respond to the query. | Holger Hans Peter Freyther | 1 | -1/+6 | |
2010-06-15 | nat: Make the MSC configurable. | Holger Hans Peter Freyther | 1 | -1/+1 | |
2010-06-15 | nat: Move MSC ip address into the config.. | Holger Hans Peter Freyther | 1 | -7/+15 | |
The address can still be specified on the cli and it will overwrite the config in the config file. | |||||
2010-06-15 | [statistics] Count the times we lost the connection to the MSC. | Holger Hans Peter Freyther | 1 | -0/+2 | |
2010-06-15 | [statistics] Provide basic statistics for the NAT | Holger Hans Peter Freyther | 1 | -0/+7 | |
Count number of SCCP connections, number of BSC reconnects, number of calls. For most of them we have a per BSC and a global count. Right now all structs using the counters survive until the end of the application so we do not need to free them. | |||||
2010-06-15 | nat: Handle unknown RLSD by send a RLC back to the network. | Holger Hans Peter Freyther | 1 | -1/+31 | |
2010-06-15 | nat: Rename variable to make it use msc in the name | Holger Hans Peter Freyther | 1 | -2/+2 | |
2010-06-15 | nat: Attempt to have a single BSC write method | Holger Hans Peter Freyther | 1 | -19/+19 | |
This method currently prepends the IPA header and sends the data. In the future we might be able to use SCTP for it. We have to remove the IPA header from the static messages for that to work. This code is untested. | |||||
2010-06-15 | nat: Rename bsc_write to bsc_send_data | Holger Hans Peter Freyther | 1 | -8/+8 | |
2010-06-15 | nat: Send the reset after we have received the init ack | Holger Hans Peter Freyther | 1 | -5/+7 | |
Sending the reset right away will upset the MSC and we need to wait for the first contact. | |||||
2010-06-15 | nat: Fix the reset message and prepend the IPA header | Holger Hans Peter Freyther | 1 | -0/+1 | |
2010-06-15 | nat: Send a GSM0808 message to the MSC when we are reconnecting | Holger Hans Peter Freyther | 1 | -0/+28 | |
The rest of the code should filter the reset ack msg. This should make the MSC give up all resources it had allocated for us. |