aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/gprs/gtphub_vty.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2015-12-06 19:11:45 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2015-12-07 13:37:11 +0100
commitee07e4f75d1fc31dd6326e50535441a391c7de1e (patch)
tree850f8eb1880d7e237bdd1411e7d48d099f23595f /openbsc/src/gprs/gtphub_vty.c
parentf6e4d082194e41c8a5b51a46c578921006496309 (diff)
gtphub: simplify/fix: one TEI mapping per tunnel.
Because the sender is known, one unique TEI per tunnel suffices to map the TEIs that the peers are sending to gtphub, instead of previously 4 (SGSN<->GGSN interaction on User and Ctrl plane, where each had an own unique TEI). Also, previously, a tunnel's endpoints should also have been checked against each other for TEI reuse, not only against the endpoints of other tunnels. This simplification fixes that problem for free. Thus simplify TEI reuse detection and improve VTY show readability and debugging. Adjust log and VTY output for tunnels. Adjust tests accordingly. Suggested-by: Holger Hans Peter Freyther <holger@moiji-mobile.com> Sponsored-by: On-Waves ehi
Diffstat (limited to 'openbsc/src/gprs/gtphub_vty.c')
-rw-r--r--openbsc/src/gprs/gtphub_vty.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/openbsc/src/gprs/gtphub_vty.c b/openbsc/src/gprs/gtphub_vty.c
index 5b9fc79b2..9e3c5e012 100644
--- a/openbsc/src/gprs/gtphub_vty.c
+++ b/openbsc/src/gprs/gtphub_vty.c
@@ -398,8 +398,8 @@ static void show_tunnels_all(struct vty *vty, int with_io_stats)
time_t now = gtphub_now();
vty_out(vty, "All tunnels%s:%s"
- "Legend: (expiry in minutes) SGSN <-> GGSN, with each:%s"
- " <IP-Ctrl>[/<IP-User>] (<TEI-Ctrl>=<mapped>/<TEI-User>=<mapped>)%s",
+ "Legend: TEI=<hex>: SGSN <-> GGSN (expiry in minutes), with each:%s"
+ " <IP-Ctrl>[/<IP-User>] (TEI C=<TEI-Ctrl-hex> U=<TEI-User-hex>)%s",
with_io_stats? "with I/O stats" : "",
VTY_NEWLINE, VTY_NEWLINE, VTY_NEWLINE);
@@ -408,9 +408,9 @@ static void show_tunnels_all(struct vty *vty, int with_io_stats)
struct gtphub_tunnel *tun;
llist_for_each_entry(tun, &g_hub->tunnels, entry) {
vty_out(vty,
- "(%4dm) %s%s",
- (int)((tun->expiry_entry.expiry - now) / 60),
+ "%s (expiry in %dm)%s",
gtphub_tunnel_str(tun),
+ (int)((tun->expiry_entry.expiry - now) / 60),
VTY_NEWLINE);
count ++;
if (!gtphub_tunnel_complete(tun))