summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/kroute.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bgpd/kroute.c')
-rw-r--r--usr.sbin/bgpd/kroute.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c
index 367b1af2d73..914859fe2ef 100644
--- a/usr.sbin/bgpd/kroute.c
+++ b/usr.sbin/bgpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.109 2004/10/16 12:24:23 henning Exp $ */
+/* $OpenBSD: kroute.c,v 1.110 2004/10/19 12:02:50 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -400,6 +400,19 @@ kr_show_route(struct imsg *imsg)
send_imsg_session(IMSG_CTL_END, imsg->hdr.pid, NULL, 0);
}
+void
+kr_ifinfo(char *ifname)
+{
+ struct kif_node *kif;
+
+ RB_FOREACH(kif, kif_tree, &kit)
+ if (!strcmp(ifname, kif->k.ifname)) {
+ send_imsg_session(IMSG_IFINFO, 0,
+ &kif->k, sizeof(kif->k));
+ return;
+ }
+}
+
/*
* RB-tree compare functions
*/
@@ -952,6 +965,8 @@ if_change(u_short ifindex, int flags, struct if_data *ifd)
kif->k.media_type = ifd->ifi_type;
kif->k.baudrate = ifd->ifi_baudrate;
+ send_imsg_session(IMSG_IFINFO, 0, &kif->k, sizeof(kif->k));
+
if ((reachable = (flags & IFF_UP) &&
(ifd->ifi_link_state != LINK_STATE_DOWN)) == kif->k.nh_reachable)
return; /* nothing changed wrt nexthop validity */