From b90dcea62391e72344b88933bec736cf5abe9f5f Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Tue, 27 Jan 2004 16:49:54 +0000 Subject: use a struct bgpd_addr instead of sockaddr_in for peer_config->local_addr and ->remote_addr for easier multiprotocol support ok claudio@ --- usr.sbin/bgpd/rde.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'usr.sbin/bgpd/rde.c') 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 @@ -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); } -- cgit v1.2.3