summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/rde_rib.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2007-01-11 22:00:18 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2007-01-11 22:00:18 +0000
commit261fa8338cdc6b1b98f0bec2fe564fc5008c87b5 (patch)
tree0dbdbf2630ca5152ecda747c749826b50b43c9c4 /usr.sbin/bgpd/rde_rib.c
parent3b42948fb8f29e870ac99f4490cf73415ee0ed20 (diff)
Correct logic in path_update() so that moves are only done when needed.
Previously prefix changes of neighbors with softreconfig in disabled where using prefix_add() instead of prefix_move(). Luckily prefix_add() has additional logic to detect this case and calls prefix_move() itself. This made backtraces of a totaly different issue so strange that I was hunting a bug for weeks at the completely wrong spot. Doh!
Diffstat (limited to 'usr.sbin/bgpd/rde_rib.c')
-rw-r--r--usr.sbin/bgpd/rde_rib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde_rib.c b/usr.sbin/bgpd/rde_rib.c
index 0cd2620a45f..66aba9fd620 100644
--- a/usr.sbin/bgpd/rde_rib.c
+++ b/usr.sbin/bgpd/rde_rib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_rib.c,v 1.91 2006/12/12 10:34:22 claudio Exp $ */
+/* $OpenBSD: rde_rib.c,v 1.92 2007/01/11 22:00:17 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Claudio Jeker <claudio@openbsd.org>
@@ -137,7 +137,7 @@ path_update(struct rde_peer *peer, struct rde_aspath *nasp,
}
/* Do not try to move a prefix that is in the wrong RIB. */
- if (p != NULL && (p->flags & flags) == 0)
+ if (p == NULL || (p->flags & flags) == 0)
p = oldp;
/*