summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-01-27 16:49:54 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-01-27 16:49:54 +0000
commitb90dcea62391e72344b88933bec736cf5abe9f5f (patch)
tree2799dae7e243490fb377d28be332d25fa779a061 /usr.sbin/bgpd/rde.c
parente4e7fa53836f3e4df92922382229f61df1b0ac80 (diff)
use a struct bgpd_addr instead of sockaddr_in for peer_config->local_addr and
->remote_addr for easier multiprotocol support ok claudio@
Diffstat (limited to 'usr.sbin/bgpd/rde.c')
-rw-r--r--usr.sbin/bgpd/rde.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index eb5a1a127c2..895e17c0b8f 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.67 2004/01/22 21:09:00 henning Exp $ */
+/* $OpenBSD: rde.c,v 1.68 2004/01/27 16:49:53 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -562,28 +562,22 @@ rde_update_log(const char *message,
const struct rde_peer *peer, const struct attr_flags *attr,
const struct bgpd_addr *prefix, u_int8_t prefixlen)
{
- char *neighbor;
char *nexthop = NULL;
struct in_addr nh;
if (! (conf->log & BGPD_LOG_UPDATES))
return;
- neighbor = strdup(inet_ntoa(peer->conf.remote_addr.sin_addr));
- if (neighbor == NULL)
- return;
-
if (attr != NULL) {
nh.s_addr = attr->nexthop;
asprintf(&nexthop, " via %s", inet_ntoa(nh));
}
log_debug("neighbor %s (AS%u) %s %s/%u %s",
- neighbor, peer->conf.remote_as, message,
+ log_addr(&peer->conf.remote_addr), peer->conf.remote_as, message,
inet_ntoa(prefix->v4), prefixlen,
nexthop ? nexthop : "");
- free(neighbor);
free(nexthop);
}