diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-09-19 14:10:25 +0200 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2016-09-23 02:39:12 +0000 |
commit | 55dc2edc89c1a85187ef8aafc09f7d922383231f (patch) | |
tree | 50accbd8ac83bd9cd520c0fa1cb6ea66cf316e3b /src/vty | |
parent | dbc68177926c7f04d42b418ee6dc559571f4d7f8 (diff) |
log telnet bind address and port
Log 'telnet at 1.2.3.4 5678' from telnet_init*. All callers can now drop any
extra 'VTY at 1.2.3.4 5678' logging.
Change-Id: I1da7b9076311d9458caea732fc0daace6533a3fd
Diffstat (limited to 'src/vty')
-rw-r--r-- | src/vty/telnet_interface.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vty/telnet_interface.c b/src/vty/telnet_interface.c index 50b08c8a..e86a6b13 100644 --- a/src/vty/telnet_interface.c +++ b/src/vty/telnet_interface.c @@ -86,7 +86,14 @@ int telnet_init_dynif(void *tall_ctx, void *priv, const char *ip, int port) server_socket.data = priv; - return (rc < 0) ? -1 : 0; + if (rc < 0) { + LOGP(DLGLOBAL, LOGL_ERROR, "Cannot bind telnet at %s %d\n", + ip, port); + return -1; + } + + LOGP(DLGLOBAL, LOGL_NOTICE, "telnet at %s %d\n", ip, port); + return 0; } extern struct host host; |