GSMTAP: --gsmtap-bind to listen beyond loopback (containers)

A container's 127.0.0.1 is its own loopback, so a GSMTAP feed sent to the
container's bridge address never reached the listener: it was hard-bound to
127.0.0.1.

- `simtrace-analyser-server --gsmtap-bind ADDR` (default 127.0.0.1) is passed
  through GsmtapListener to GsmtapReceiver (whose bind_ip already existed),
  including the receiver re-created by a start() after close.  The startup
  banner prints the effective bind address next to the port.
- READMEs (EN/RU) document the option, naming the container case.
- tests: the listener forwards the address on construction and on start(),
  binds 0.0.0.0, and keeps the loopback default.

Verified end-to-end: with --gsmtap-bind 0.0.0.0 the socket listens on
0.0.0.0:14732 and an ATR + APDU sent to 127.0.0.1:14732 landed in the capture
session (2 messages); without the flag it listens on 127.0.0.1.
557 Python + 80 Node tests.
This commit is contained in:
catarrh committed 2026-10-26 14:45:58 +03:00
1 parent c810ff50cf
commit 903ead9791
5 files changed
+51 -5

No files matched your search

+2
View File
@@ -342,6 +342,8 @@ Server options:
--db FILE SQLite database path (default: ~/.simtrace-analyser/sessions.db)
--capture MODE gsmtap | direct | disabled (default: gsmtap)
--gsmtap-port PORT UDP port for the GSMTAP listener (default: 4729)
--gsmtap-bind ADDR UDP bind address for the GSMTAP listener (default: 127.0.0.1;
use 0.0.0.0 to receive from a Docker bridge or another host)
--web-dir PATH PWA static files directory (default: the PWA bundled in
the installed package, or <repo>/frontend from source)
```