summaryrefslogtreecommitdiff
path: root/lib/sockunion.c
diff options
context:
space:
mode:
authorJorge Boncompte [DTI2] <jorge@dti2.net>2012-04-10 16:57:23 +0200
committerDavid Lamparter <equinox@diac24.net>2012-05-02 17:03:27 +0200
commitd227617a972bb20a974be68bea5032e692a0970f (patch)
tree550ab426e690a34ffe8955eeccf2c93a616adef2 /lib/sockunion.c
parent0c5ed3ed00f630ae95dc2dfd4b5a938683e2a99e (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/sockunion.c')
-rw-r--r--lib/sockunion.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/lib/sockunion.c b/lib/sockunion.c
index 59770529..cfb6f9c5 100644
--- a/lib/sockunion.c
+++ b/lib/sockunion.c
@@ -207,25 +207,6 @@ sockunion_str2su (const char *str)
return NULL;
}
-char *
-sockunion_su2str (union sockunion *su)
-{
- char str[SU_ADDRSTRLEN];
-
- switch (su->sa.sa_family)
- {
- case AF_INET:
- inet_ntop (AF_INET, &su->sin.sin_addr, str, sizeof (str));
- break;
-#ifdef HAVE_IPV6
- case AF_INET6:
- inet_ntop (AF_INET6, &su->sin6.sin6_addr, str, sizeof (str));
- break;
-#endif /* HAVE_IPV6 */
- }
- return XSTRDUP (MTYPE_TMP, str);
-}
-
/* Convert IPv4 compatible IPv6 address to IPv4 address. */
static void
sockunion_normalise_mapped (union sockunion *su)