diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-16 11:14:34 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-11-16 11:16:37 +0100 |
commit | 7694381f52983f95320f8e01f4d8b4cca934dfff (patch) | |
tree | 26129a66f8718eefdb6bb882ccc558f72b12baf7 | |
parent | 594ee9a8c444034d75f995e0efbae646ddae2761 (diff) |
udt: Add a forward_only to the bsc struct and use it for the msc_conn
Simply forward everything, no need for inspecting things.
-rw-r--r-- | include/bsc_data.h | 2 | ||||
-rw-r--r-- | src/main_udt.c | 1 | ||||
-rw-r--r-- | src/msc_conn.c | 9 |
3 files changed, 12 insertions, 0 deletions
diff --git a/include/bsc_data.h b/include/bsc_data.h index a83d089..9030910 100644 --- a/include/bsc_data.h +++ b/include/bsc_data.h @@ -115,6 +115,8 @@ struct bsc_data { uint16_t mcc; uint16_t mnc; uint16_t lac; + + int forward_only; }; /* bsc related functions */ diff --git a/src/main_udt.c b/src/main_udt.c index 0b07da7..3e41d91 100644 --- a/src/main_udt.c +++ b/src/main_udt.c @@ -254,6 +254,7 @@ int main(int argc, char **argv) bsc.ping_time = 20; bsc.pong_time = 5; bsc.msc_time = 20; + bsc.forward_only = 1; handle_options(argc, argv); diff --git a/src/msc_conn.c b/src/msc_conn.c index f980178..f2a3e1a 100644 --- a/src/msc_conn.c +++ b/src/msc_conn.c @@ -201,6 +201,15 @@ static int ipaccess_a_fd_cb(struct bsc_fd *bfd) } else if (hh->proto == IPAC_PROTO_SCCP) { struct sccp_parse_result result; int rc; + + /* we can not forward it right now */ + if (bsc->forward_only && link->sccp_up) { + if (send_or_queue_bsc_msg(link, 13, msg) != 1) + msgb_free(msg); + return 0; + } + + rc = bss_patch_filter_msg(msg, &result); if (rc == BSS_FILTER_RESET_ACK) { |