From 261fa8338cdc6b1b98f0bec2fe564fc5008c87b5 Mon Sep 17 00:00:00 2001 From: Claudio Jeker Date: Thu, 11 Jan 2007 22:00:18 +0000 Subject: 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! --- usr.sbin/bgpd/rde_rib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/bgpd') 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 @@ -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; /* -- cgit v1.2.3