diff options
author | heasley <heas@shrubbery.net> | 2009-12-07 16:41:14 +0300 |
---|---|---|
committer | Denis Ovsienko <infrastation@yandex.ru> | 2009-12-07 16:41:14 +0300 |
commit | 78e6cd98dd88393d0863388caf37dae45435db7a (patch) | |
tree | 3c1e57265ea8f54055eb67b3ceb147da90920e0d /lib/vty.c | |
parent | 64bf3ab7291cc5c39c5add0dc1a7de447914248b (diff) |
lib: log source of vty connections (bug #566)
heasley: I've used this for a while to track usage.
Diffstat (limited to 'lib/vty.c')
-rw-r--r-- | lib/vty.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1692,6 +1692,7 @@ vty_accept (struct thread *thread) int accept_sock; struct prefix *p = NULL; struct access_list *acl = NULL; + char *bufp; accept_sock = THREAD_FD (thread); @@ -1764,6 +1765,11 @@ vty_accept (struct thread *thread) zlog (NULL, LOG_INFO, "can't set sockopt to vty_sock : %s", safe_strerror (errno)); + zlog (NULL, LOG_INFO, "Vty connection from %s", + (bufp = sockunion_su2str (&su))); + if (bufp) + XFREE (MTYPE_TMP, bufp); + vty = vty_create (vty_sock, &su); return 0; |