gbproxy: Track SGSN and BSS TLLI/PTMSI separately
This patch separates BSS side from SGSN side TLLI/PTMSI tracking. When
TLLI/PTMSI patching is not enabled, the corresponding states shall be
identical. The TLLI/PTMSI state has been moved into the struct
gbproxy_tlli_state and is used twice in gbproxy_tlli_info.
Since the state handling for uplink and downlink messages is
diverging, gbprox_update_state() is replaced by two functions
gbprox_update_state_dl/gbprox_update_state_ul and
gbprox_process_bssgp_message() is replaced by
gbprox_process_bssgp_dl/gbprox_process_bssgp_ul.
Sponsored-by: On-Waves ehf
diff --git a/openbsc/src/gprs/gb_proxy_vty.c b/openbsc/src/gprs/gb_proxy_vty.c
index 9574a45..d1b912f 100644
--- a/openbsc/src/gprs/gb_proxy_vty.c
+++ b/openbsc/src/gprs/gb_proxy_vty.c
@@ -377,7 +377,7 @@
snprintf(mi_buf, sizeof(mi_buf), "(none)");
}
vty_out(vty, " TLLI %08x, IMSI %s, AGE %d%s",
- tlli_info->tlli, mi_buf, (int)age,
+ tlli_info->tlli.current, mi_buf, (int)age,
VTY_NEWLINE);
}
}
@@ -532,7 +532,7 @@
}
llist_for_each_entry_safe(tlli_info, nxt, &state->enabled_tllis, list) {
- if (match == MATCH_TLLI && tlli_info->tlli != tlli)
+ if (match == MATCH_TLLI && tlli_info->tlli.current != tlli)
continue;
if (match == MATCH_IMSI) {
@@ -544,7 +544,8 @@
if (strcmp(mi_buf, imsi) != 0)
continue;
}
- vty_out(vty, "Deleting TLLI %08x%s", tlli_info->tlli, VTY_NEWLINE);
+ vty_out(vty, "Deleting TLLI %08x%s", tlli_info->tlli.current,
+ VTY_NEWLINE);
gbprox_delete_tlli(peer, tlli_info);
found += 1;
}