From fe5d7575d8abfaeca35c1021b0c1793e360d722e Mon Sep 17 00:00:00 2001 From: Henning Brauer Date: Thu, 19 Aug 2004 10:38:35 +0000 Subject: logic error: when there's changes affecting nexthop reachability, always notify the RDE and not only if the nexthop was previously unreachable, i.e. its validity changed. found the hard way by Arvid Grtting , claudio ok --- usr.sbin/bgpd/kroute.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/bgpd/kroute.c b/usr.sbin/bgpd/kroute.c index ed47f88ea89..7fe17b7db7b 100644 --- a/usr.sbin/bgpd/kroute.c +++ b/usr.sbin/bgpd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.106 2004/08/05 15:58:21 claudio Exp $ */ +/* $OpenBSD: kroute.c,v 1.107 2004/08/19 10:38:34 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer @@ -740,15 +740,13 @@ knexthop_validate(struct knexthop_node *kn) if (was_valid) send_nexthop_update(&n); } else { /* valid */ - if (!was_valid) { - n.valid = 1; - n.connected = kr->r.flags & F_CONNECTED; - if ((n.gateway.v4.s_addr = - kr->r.nexthop.s_addr) != 0) - n.gateway.af = AF_INET; - memcpy(&n.kr, &kr->r, sizeof(n.kr)); - send_nexthop_update(&n); - } + n.valid = 1; + n.connected = kr->r.flags & F_CONNECTED; + if ((n.gateway.v4.s_addr = + kr->r.nexthop.s_addr) != 0) + n.gateway.af = AF_INET; + memcpy(&n.kr, &kr->r, sizeof(n.kr)); + send_nexthop_update(&n); } kroute_attach_nexthop(kn, kr); } -- cgit v1.2.3