aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-10-20 18:58:12 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-10-20 19:21:06 +0200
commit721c457e614a16942ec92648963f71a6ff55341c (patch)
tree9067fe6dc4f834a59588775571e8e3d6cfa333e7
parente512e3fd2f74c099046b0ac4261f60ef5a69094d (diff)
lua: Check for disconnects with non normal release too
-rw-r--r--openbsc/contrib/a-link/sccp-split-by-con.lua38
1 files changed, 38 insertions, 0 deletions
diff --git a/openbsc/contrib/a-link/sccp-split-by-con.lua b/openbsc/contrib/a-link/sccp-split-by-con.lua
index 51ca4ef07..df3a70bad 100644
--- a/openbsc/contrib/a-link/sccp-split-by-con.lua
+++ b/openbsc/contrib/a-link/sccp-split-by-con.lua
@@ -11,9 +11,47 @@ do
local ip_src_field = Field.new("ip.src")
local ip_dst_field = Field.new("ip.dst")
+ --
+ local bssmap_msgtype_field = Field.new("gsm_a.bssmap_msgtype")
+ -- assignment failure 0x03
+ --
+
+ --
+ local dtap_cause_field = Field.new("gsm_a_dtap.cause")
+ local dtap_cc_field = Field.new("gsm_a.dtap_msg_cc_type")
+
local connections = {}
function check_failure(con)
+ check_lu_reject(con)
+ check_disconnect(con)
+ end
+
+ -- check if a DISCONNECT is normal
+ function check_disconnect(con)
+ local msg_type = dtap_cc_field()
+ if not msg_type then
+ return
+ end
+
+ if tonumber(msg_type) ~= 0x25 then
+ return
+ end
+
+ local cause = dtap_cause_field()
+ if not cause then
+ return
+ end
+
+ cause = tonumber(cause)
+ if cause ~= 0x10 then
+ print("DISCONNECT != Normal")
+ con[4] = true
+ end
+ end
+
+ -- check if we have a LU Reject
+ function check_lu_reject(con)
local msg_type = msg_type_field()
if not msg_type then
return