summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/bgpd/bgpd.h3
-rw-r--r--usr.sbin/bgpd/kroute.c7
2 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h
index 5633c3aa05a..362a2026167 100644
--- a/usr.sbin/bgpd/bgpd.h
+++ b/usr.sbin/bgpd/bgpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.h,v 1.156 2005/03/11 12:54:19 claudio Exp $ */
+/* $OpenBSD: bgpd.h,v 1.157 2005/03/14 12:25:50 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -408,6 +408,7 @@ struct pftable_msg {
struct ctl_show_nexthop {
struct bgpd_addr addr;
u_int8_t valid;
+ struct kif kif;
};
struct ctl_neighbor {
diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c
index 11d5addb0ba..84608dd7bb7 100644
--- a/usr.sbin/bgpd/kroute.c
+++ b/usr.sbin/bgpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.115 2005/03/14 08:44:33 henning Exp $ */
+/* $OpenBSD: kroute.c,v 1.116 2005/03/14 12:25:50 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -382,8 +382,11 @@ kr_show_route(struct imsg *imsg)
RB_FOREACH(h, knexthop_tree, &knt) {
bzero(&snh, sizeof(snh));
memcpy(&snh.addr, &h->nexthop, sizeof(snh.addr));
- if (h->kroute != NULL)
+ if (h->kroute != NULL) {
snh.valid = kroute_validate(&h->kroute->r);
+ if ((kif = kif_find(h->kroute->r.ifindex)) != NULL)
+ memcpy(&snh.kif, &kif->k, sizeof(snh.kif));
+ }
send_imsg_session(IMSG_CTL_SHOW_NEXTHOP, imsg->hdr.pid,
&snh, sizeof(snh));
}