summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/log.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/usr.sbin/bgpd/log.c b/usr.sbin/bgpd/log.c
index bbece753be9..1fda8f69fb4 100644
--- a/usr.sbin/bgpd/log.c
+++ b/usr.sbin/bgpd/log.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: log.c,v 1.23 2004/01/27 16:49:53 henning Exp $ */
+/* $OpenBSD: log.c,v 1.24 2004/01/27 21:20:44 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -383,11 +383,12 @@ log_ntoa(in_addr_t ip)
}
char *
-log_addr(const struct bgpd_addr *addr) {
- switch (addr->af) {
- case AF_INET:
- return (inet_ntoa(addr->v4));
- default:
- return ("(unknown address family)");
- }
+log_addr(const struct bgpd_addr *addr)
+{
+ static char buf[48];
+
+ if(inet_ntop(addr->af, &addr->ba, buf, sizeof(buf)) == NULL)
+ return ("?");
+ else
+ return (buf);
}