summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/bgpd.c13
-rw-r--r--usr.sbin/bgpd/kroute.c6
2 files changed, 8 insertions, 11 deletions
diff --git a/usr.sbin/bgpd/bgpd.c b/usr.sbin/bgpd/bgpd.c
index 39366472796..2f5df44386b 100644
--- a/usr.sbin/bgpd/bgpd.c
+++ b/usr.sbin/bgpd/bgpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.c,v 1.71 2004/01/22 20:34:55 henning Exp $ */
+/* $OpenBSD: bgpd.c,v 1.72 2004/01/23 21:18:12 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -480,19 +480,16 @@ dispatch_imsg(struct imsgbuf *ibuf, int idx, struct mrt_head *mrt_l)
void
send_nexthop_update(struct kroute_nexthop *msg)
{
- char *gw = NULL, *nh = NULL;
+ char *gw = NULL;
- if (msg->gateway.af == AF_INET)
+ if (msg->gateway.af)
if (asprintf(&gw, ": via %s",
- log_ntoa(msg->gateway.v4.s_addr)) == -1) {
+ log_addr(&msg->gateway)) == -1) {
log_warn("send_nexthop_update");
quit = 1;
}
- if (msg->nexthop.af == AF_INET)
- nh = log_ntoa(msg->nexthop.v4.s_addr);
-
- log_info("nexthop %s now %s%s%s", nh,
+ log_info("nexthop %s now %s%s%s", log_addr(&msg->nexthop),
msg->valid ? "valid" : "invalid",
msg->connected ? ": directly connected" : "",
msg->gateway.af ? gw : "");
diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c
index 9a71c65e438..0254f1fa49b 100644
--- a/usr.sbin/bgpd/kroute.c
+++ b/usr.sbin/bgpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.77 2004/01/22 20:34:56 henning Exp $ */
+/* $OpenBSD: kroute.c,v 1.78 2004/01/23 21:18:12 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -503,7 +503,7 @@ knexthop_insert(struct knexthop_node *kn)
{
if (RB_INSERT(knexthop_tree, &knt, kn) != NULL) {
log_warnx("knexthop_tree insert failed for %s",
- log_ntoa(kn->nexthop.v4.s_addr));
+ log_addr(&kn->nexthop));
free(kn);
return (-1);
}
@@ -520,7 +520,7 @@ knexthop_remove(struct knexthop_node *kn)
if (RB_REMOVE(knexthop_tree, &knt, kn) == NULL) {
log_warnx("knexthop_remove failed for %s",
- log_ntoa(kn->nexthop.v4.s_addr));
+ log_addr(&kn->nexthop));
return (-1);
}