aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/tests/bsc-nat
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-21 15:45:26 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-06-15 20:24:15 +0800
commit5e63f921f08ef5edd03ff18fe1f85c81461e3957 (patch)
treef8b2bf2c23c2ca6fb1ef73c06b7ef78f4b364b6a /openbsc/tests/bsc-nat
parent842c0c020f0e454a6386b3da00864029c740bc30 (diff)
[nat] Add unit test to forward Proto Error messages back both ways.
Diffstat (limited to 'openbsc/tests/bsc-nat')
-rw-r--r--openbsc/tests/bsc-nat/bsc_nat_test.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/openbsc/tests/bsc-nat/bsc_nat_test.c b/openbsc/tests/bsc-nat/bsc_nat_test.c
index aabc1304a..7ff2c200f 100644
--- a/openbsc/tests/bsc-nat/bsc_nat_test.c
+++ b/openbsc/tests/bsc-nat/bsc_nat_test.c
@@ -96,6 +96,12 @@ static const u_int8_t connnection_it[] = {
0x00, 0x00, 0x00, 0x00,
};
+/* error in both directions */
+static const u_int8_t proto_error[] = {
+ 0x00, 0x05, 0xfd,
+ 0x0f, 0x22, 0x33, 0x44, 0x00,
+};
+
/* MGCP wrap... */
static const u_int8_t mgcp_msg[] = {
0x00, 0x03, 0xfc,
@@ -176,6 +182,19 @@ static const struct filter_result results[] = {
.dir = DIR_MSC,
.result = 0,
},
+ {
+ .data = proto_error,
+ .length = ARRAY_SIZE(proto_error),
+ .dir = DIR_BSC,
+ .result = 0,
+ },
+ {
+ .data = proto_error,
+ .length = ARRAY_SIZE(proto_error),
+ .dir = DIR_MSC,
+ .result = 0,
+ },
+
};
static void test_filter(void)