From 7cc316c91791c1e20ee36ba6a4515dea7eb0da96 Mon Sep 17 00:00:00 2001 From: Matthias Frei Date: Wed, 19 Feb 2020 07:47:24 +0100 Subject: [PATCH] Log local address with IA when registering to dispatcher (#3669) Include the local `IA` in the debug log after registering to the dispatcher. This allows to verify that the application is running in the correct networking context. As a bonus, this allows to copy-paste the logged address from the debug log to connect to a server application. --- go/lib/snet/snet.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/lib/snet/snet.go b/go/lib/snet/snet.go index ddcc245054..248f0e6b9b 100644 --- a/go/lib/snet/snet.go +++ b/go/lib/snet/snet.go @@ -163,6 +163,6 @@ func (n *SCIONNetwork) Listen(ctx context.Context, network string, listen *net.U // Update port conn.listen.Port = int(port) } - log.Debug("Registered with dispatcher", "addr", conn.listen) + log.Debug("Registered with dispatcher", "addr", &UDPAddr{IA: n.localIA, Host: conn.listen}) return newSCIONConn(conn, n.querier, packetConn), nil }