summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2006-06-14 17:10:42 +0000
committerclaudio <claudio@openbsd.org>2006-06-14 17:10:42 +0000
commit6a0593c83b5a2d916a9d0d70a602b84031d468fb (patch)
tree45a7de9334fcb09813502fbee6ef2051c7817e6f
parentSend bot nexthops (exit and true) in the bgpctl show rib cases. bgpctl (diff)
downloadwireguard-openbsd-6a0593c83b5a2d916a9d0d70a602b84031d468fb.tar.xz
wireguard-openbsd-6a0593c83b5a2d916a9d0d70a602b84031d468fb.zip
bgpctl show rib shows now the exit nexthop per default and not the true
nexthop as before. The detailed output includes both nexthops. OK henning@
-rw-r--r--usr.sbin/bgpctl/bgpctl.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c
index a2d0020a3f7..b006b86ed5b 100644
--- a/usr.sbin/bgpctl/bgpctl.c
+++ b/usr.sbin/bgpctl/bgpctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpctl.c,v 1.105 2006/05/27 21:25:06 claudio Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.106 2006/06/14 17:10:42 claudio Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -1039,7 +1039,7 @@ show_rib_summary_msg(struct imsg *imsg)
memcpy(&rib, imsg->data, sizeof(rib));
print_prefix(&rib.prefix, rib.prefixlen, rib.flags);
- printf("%-15s ", log_addr(&rib.nexthop));
+ printf("%-15s ", log_addr(&rib.exit_nexthop));
printf(" %5u %5u ", rib.local_pref, rib.med);
@@ -1089,7 +1089,8 @@ show_rib_detail_msg(struct imsg *imsg, int nodescr)
free(aspath);
s = fmt_peer(rib.descr, &rib.remote_addr, -1, nodescr);
- printf(" Nexthop %s from %s (", log_addr(&rib.nexthop), s);
+ printf(" Nexthop %s ", log_addr(&rib.exit_nexthop));
+ printf("(via %s) from %s (", log_addr(&rib.true_nexthop), s);
free(s);
id.s_addr = htonl(rib.remote_id);
printf("%s)\n", inet_ntoa(id));