From d227617a972bb20a974be68bea5032e692a0970f Mon Sep 17 00:00:00 2001 From: "Jorge Boncompte [DTI2]" Date: Tue, 10 Apr 2012 16:57:23 +0200 Subject: lib: remove last uses of sockunion_su2str() Use of this function is prone to memory leaks. This fixes a memory accounting bug for vty denied connections. Signed-off-by: Jorge Boncompte [DTI2] Signed-off-by: David Lamparter --- lib/vty.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/vty.h') diff --git a/lib/vty.h b/lib/vty.h index 639d7417..e5158687 100644 --- a/lib/vty.h +++ b/lib/vty.h @@ -23,6 +23,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA #include "thread.h" #include "log.h" +#include "sockunion.h" #define VTY_BUFSIZ 512 #define VTY_MAXHIST 20 @@ -39,9 +40,6 @@ struct vty /* Node status of this vty */ int node; - /* What address is this vty comming from. */ - char *address; - /* Failure count */ int fail; @@ -118,6 +116,9 @@ struct vty /* Timeout seconds and thread. */ unsigned long v_timeout; struct thread *t_timeout; + + /* What address is this vty comming from. */ + char address[SU_ADDRSTRLEN]; }; /* Integrated configuration file. */ -- cgit v1.2.1