summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-01-07 01:58:57 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-01-07 01:58:57 +0000
commitb929dc1ed2d5880c074beebb6a989ca1deff0ca8 (patch)
tree7fdcca5c0aa23a8e05f7f293a2e07cf4df1ed40e /usr.sbin/bgpd
parent8111f390807c72fc4f259ea350f82fcfd3f77422 (diff)
don't ever send kroute change (that includes add) requests to the parent
where the nexthop is not in state NEXTHOP_REACH. previously routes in state NEXTHOP_LOOKUP, i. e. not yet verified, were send to the parent process causing unnecessary and of course failing route add attempts, cluttering logs, etc. nexthops in state NEXTHOP_UNREACH were handled correctly.
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/rde.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/rde.c b/usr.sbin/bgpd/rde.c
index abe07e9139c..2ef49c1a800 100644
--- a/usr.sbin/bgpd/rde.c
+++ b/usr.sbin/bgpd/rde.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde.c,v 1.48 2004/01/07 00:01:16 claudio Exp $ */
+/* $OpenBSD: rde.c,v 1.49 2004/01/07 01:58:56 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -591,6 +591,8 @@ rde_send_kroute(struct prefix *new, struct prefix *old)
} else {
type = IMSG_KROUTE_CHANGE;
p = new;
+ if (new->aspath->nexthop->state != NEXTHOP_REACH)
+ return;
kr.nexthop = p->aspath->nexthop->true_nexthop.s_addr;
}