diff options
Diffstat (limited to 'lib/vty.c')
| -rw-r--r-- | lib/vty.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -1810,7 +1810,12 @@ static int vty_accept(struct thread *thread) set_nonblocking(vty_sock); set_cloexec(vty_sock); - sockunion2hostprefix(&su, &p); + if (!sockunion2hostprefix(&su, &p)) { + close(vty_sock); + zlog_info("Vty unable to convert prefix from sockunion %s", + sockunion2str(&su, buf, SU_ADDRSTRLEN)); + return -1; + } /* VTY's accesslist apply. */ if (p.family == AF_INET && vty_accesslist_name) { |
