aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/osmo-bsc_nat/bsc_nat_filter.c
AgeCommit message (Collapse)AuthorFilesLines
2015-05-03filter: Move the con_type into the filter_stateHolger Hans Peter Freyther1-1/+1
2015-05-03filter: Remove bsc_connection from the filter APIHolger Hans Peter Freyther1-2/+16
Remove the last occurence of NAT datastructures in the filtering module and add the ctx to the filter request structure.
2015-05-03filter: Remove nat_sccp_connection from public APIHolger Hans Peter Freyther1-2/+2
2015-05-03filter: Separate SCCP/BSSAP extraction and gsm48 codeHolger Hans Peter Freyther1-0/+105
For the BSC we will have the gsm48_hdr and don't need to find data within SCCP. For legacy reasons we need to initialize con_type, imsi, reject causes early on and need to do the same in the filter method.
2015-05-03filter: Move the gsm 04.08 filter to a common placeHolger Hans Peter Freyther1-443/+0
For customer requirements we want to be able to do filtering on the BSC as well. The same messages need to be scanned and the same access-lists will be looked at. In the future we might even split traffic based on the IMSI. Begin with moving the code to a new top level directory and then renaming and removing the nat dependency.
2015-04-05nat: The reject cause of "-1" has failure meaning, change itHolger Hans Peter Freyther1-1/+1
bsc_stat_reject is treating -1 as parsing failure but for the global barring. Change it to another return value so it is not counted as parsing failure.
2014-01-20nat: Introduce reject cause to bsc_nat_acc_lst_entryHolger Hans Peter Freyther1-4/+12
The filtering architecture already allowed to specify a reject reason but this has not been used for the access-lists. Extend the access-list to include a reject reason and extend the test case to honor it.
2013-04-16nat: Rename "struct sccp_connections" to "struct nat_sccp_connection"Holger Hans Peter Freyther1-2/+2
The name sccp_connection is used in the osmo-sccp code, sccp_connections was used in the NAT for tracking a sccp_connection. Rename it so it is obvious that the struct belongs to the nat. The rename was done with sed: $ sed -i s,"struct sccp_connections","struct nat_sccp_connection",g \ include/openbsc/*.h src/osmo-bsc_nat/* tests/*/*
2013-01-07nat: Introduce a global IMSI barr list using red-black treesHolger Hans Peter Freyther1-13/+111
2013-01-07nat: Simplify the code and call auth_imsi from the main methodHolger Hans Peter Freyther1-24/+29
Do the auth check in bsc_nat_filter_sccp_cr, remove the cause from the signature again. For the bsc_nat_filter_dt restructure the flow but leave the auth inside the id response message. Return 1 when the IMSI has been extracted as indicator for running the auth check. 1 has not been used before and is safe to be used as this indicator.
2013-01-07nat: Get the cause into the imsi_auth method in preparationHolger Hans Peter Freyther1-13/+19
For the new barr feature get the cause struct down to the imsi_auth code so we can add the blacklist there.
2013-01-07nat: Allow the filter to select the reject causeHolger Hans Peter Freyther1-5/+11
In preparation for another kind of black-list allow the filter code to decide how the connection should be rejected. Introduce a new struct that will carry the reject causes for certain operations.
2013-01-07nat: Move the IMSI/TMSI filtering to a new and dedicated fileHolger Hans Peter Freyther1-0/+320
Move all routines related to filtering to a separate file.