diff options
author | Jorge Boncompte [DTI2] <jorge@dti2.net> | 2012-04-10 16:57:23 +0200 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2012-05-02 17:03:27 +0200 |
commit | d227617a972bb20a974be68bea5032e692a0970f (patch) | |
tree | 550ab426e690a34ffe8955eeccf2c93a616adef2 /lib/vty.h | |
parent | 0c5ed3ed00f630ae95dc2dfd4b5a938683e2a99e (diff) |
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] <jorge@dti2.net>
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'lib/vty.h')
-rw-r--r-- | lib/vty.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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. */ |