diff options
author | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2014-09-05 10:22:27 +0200 |
---|---|---|
committer | Jacob Erlbeck <jerlbeck@sysmocom.de> | 2014-09-09 09:47:03 +0200 |
commit | 37fda77814586d55f9d9517871d874408c914d15 (patch) | |
tree | d64cd4f121bddb9a16cccbad30d97690fb79c4cf /openbsc/src/gprs/gb_proxy_patch.c | |
parent | 52f070a099f639edd4d8aa23f0c8155a80e4300c (diff) |
gbproxy: Change creation of tlli_info for SGSN originated messages
Currently tlli_info are created for SGSN originated messages when
the SGSN TLLI cannot be found and P-TMSI patching is active. This
doesn't make much sense, since the BSS side TLLI is not known in this
case. Given that the SGSN is working properly, that can only happen
if either the tlli_info has expired or the gbproxy has been
restarted.
This patch disables the creation of a tlli_info in this case.
Note that these messages are passed unmodified to the MS so far.
Sponsored-by: On-Waves ehf
Diffstat (limited to 'openbsc/src/gprs/gb_proxy_patch.c')
-rw-r--r-- | openbsc/src/gprs/gb_proxy_patch.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/openbsc/src/gprs/gb_proxy_patch.c b/openbsc/src/gprs/gb_proxy_patch.c index c1b88d99e..970f2f62c 100644 --- a/openbsc/src/gprs/gb_proxy_patch.c +++ b/openbsc/src/gprs/gb_proxy_patch.c @@ -335,6 +335,15 @@ void gbproxy_patch_bssgp(struct msgb *msg, uint8_t *bssgp, size_t bssgp_len, goto patch_error; } + if (!tlli_info && parse_ctx->tlli_enc && parse_ctx->to_bss) { + /* Happens with unknown (not cached) TLLI coming from + * the SGSN */ + /* TODO: What shall be done with the message in this case? */ + err_ctr = GBPROX_PEER_CTR_TLLI_UNKNOWN; + err_info = "TLLI sent by the SGSN is unknown"; + goto patch_error; + } + if (!tlli_info) return; @@ -346,13 +355,6 @@ void gbproxy_patch_bssgp(struct msgb *msg, uint8_t *bssgp, size_t bssgp_len, gbproxy_patch_tlli(parse_ctx->tlli_enc, peer, tlli, parse_ctx->to_bss, "TLLI"); parse_ctx->tlli = tlli; - } else if (parse_ctx->to_bss) { - /* Happens with unknown (not cached) TLLI coming from - * the SGSN */ - /* TODO: What shall be done with the message in this case? */ - err_ctr = GBPROX_PEER_CTR_TLLI_UNKNOWN; - err_info = "TLLI sent by the SGSN is unknown"; - goto patch_error; } else { /* Internal error */ err_ctr = GBPROX_PEER_CTR_PATCH_ERR; |