diff options
| author | Neels Hofmeyr <neels@hofmeyr.de> | 2019-04-01 22:24:33 +0200 | 
|---|---|---|
| committer | Harald Welte <laforge@gnumonks.org> | 2019-04-13 21:38:58 +0000 | 
| commit | 9838c9070fb8147418e65348e71147a52f64320b (patch) | |
| tree | f1d9c54235f01cb5a47f73a3eb3ca082a729f3b9 /tests | |
| parent | 0ee798a0172a009cec4fb27c427b8f1d66fca749 (diff) | |
GSUP: add Message Class IE
osmo-msc and osmo-hlr have distinct subsystems handling incoming GSUP messages.
So far we decide entirely by message type which code path should handle a GSUP
message. Thus no GSUP message type may be re-used across subsystems.
If we add a GSUP message to indicate a routing error, it would have to be a
distinct message type for subscriber management, another one for SMS, another
one for USSD...
To allow introducing common message types, introduce a GSUP Message Class IE.
In the presence of this IE, GSUP handlers can trivially direct a received
message to the right code path. If it is missing, handlers can fall back to the
previous switch(message_type) method.
Change-Id: Ic397a9f2c4a7224e47cab944c72e75ca5592efef
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/gsup/gsup_test.c | 4 | ||||
| -rw-r--r-- | tests/gsup/gsup_test.err | 8 | 
2 files changed, 7 insertions, 5 deletions
| diff --git a/tests/gsup/gsup_test.c b/tests/gsup/gsup_test.c index 4ad7431e..0631a514 100644 --- a/tests/gsup/gsup_test.c +++ b/tests/gsup/gsup_test.c @@ -11,6 +11,7 @@  #define TEST_IMSI_IE 0x01, 0x08, 0x21, 0x43, 0x65, 0x87, 0x09, 0x21, 0x43, 0xf5  #define TEST_IMSI_STR "123456789012345" +#define TEST_CLASS_SUBSCR_IE 0xa, 0x1, 0x1  static void test_gsup_messages_dec_enc(void)  { @@ -20,7 +21,8 @@ static void test_gsup_messages_dec_enc(void)  	static const uint8_t send_auth_info_req[] = {  		0x08, -		TEST_IMSI_IE +		TEST_IMSI_IE, +		TEST_CLASS_SUBSCR_IE  	};  	static const uint8_t send_auth_info_err[] = { diff --git a/tests/gsup/gsup_test.err b/tests/gsup/gsup_test.err index 225735e9..92838231 100644 --- a/tests/gsup/gsup_test.err +++ b/tests/gsup/gsup_test.err @@ -1,5 +1,5 @@ -  generated message: 08 01 08 21 43 65 87 09 21 43 f5  -  original message:  08 01 08 21 43 65 87 09 21 43 f5  +  generated message: 08 01 08 21 43 65 87 09 21 43 f5 0a 01 01  +  original message:  08 01 08 21 43 65 87 09 21 43 f5 0a 01 01     IMSI:              123456789012345    generated message: 09 01 08 21 43 65 87 09 21 43 f5 02 01 07     original message:  09 01 08 21 43 65 87 09 21 43 f5 02 01 07  @@ -73,7 +73,7 @@    generated message: 32 01 08 21 43 65 87 09 21 43 f5 51 01 00     original message:  32 01 08 21 43 65 87 09 21 43 f5 51 01 00     IMSI:              123456789012345 -  message 0: tested 11 truncations, 11 parse failures +  message 0: tested 14 truncations, 13 parse failures    message 1: tested 14 truncations, 13 parse failures    message 2: tested 83 truncations, 81 parse failures    message 3: tested 11 truncations, 11 parse failures @@ -99,7 +99,7 @@    message 23: tested 14 truncations, 13 parse failures    message 24: tested 14 truncations, 13 parse failures  DLGSUP Stopping DLGSUP logging -  message 0: tested 2816 modifications, 510 parse failures +  message 0: tested 3584 modifications, 771 parse failures    message 1: tested 3584 modifications, 770 parse failures    message 2: tested 21248 modifications, 2575 parse failures    message 3: tested 2816 modifications, 510 parse failures | 
