summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-01-08 16:55:26 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-01-08 16:55:26 +0000
commit553a91a70d9aa25f02c8763c0a6fa09ab9d02d34 (patch)
tree54bfe05352d3939afe3ffefc0744b3c85ffdca8d
parentb4ce0c5ded1803f44163d2cbe4ff2f72a7bb3e27 (diff)
in knexthop_validate, always call kroute_detach_nexthop, not
only in the no-match-found case. if we fina a match we are calling kroute_attach_nexthop anyway; and the match might be (in the common cases: will be, if existant at all) different for the existing attachment.
-rw-r--r--usr.sbin/bgpd/kroute.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c
index 7a5c83d32d1..7976a1dbe52 100644
--- a/usr.sbin/bgpd/kroute.c
+++ b/usr.sbin/bgpd/kroute.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kroute.c,v 1.55 2004/01/08 16:52:05 henning Exp $ */
+/* $OpenBSD: kroute.c,v 1.56 2004/01/08 16:55:25 henning Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -556,11 +556,11 @@ knexthop_validate(struct knexthop_node *kn)
bzero(&n, sizeof(n));
n.nexthop = kn->nexthop;
+ kroute_detach_nexthop(kn);
if ((kr = kroute_match(kn->nexthop)) == NULL) { /* no match */
if (was_valid)
send_nexthop_update(&n);
- kroute_detach_nexthop(kn);
} else { /* found match */
if (kr->flags & F_DOWN) { /* but is down */
if (was_valid)