summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2004-08-19 10:38:35 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2004-08-19 10:38:35 +0000
commitfe5d7575d8abfaeca35c1021b0c1793e360d722e (patch)
tree72e533f453cae4b4c25a67a596f4efeb1f7e613d /usr.sbin
parentb8d0eab4980b9d45afa6bfe9bbabaa69e4a83d25 (diff)
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 <arvidg@netfonds.no>, claudio ok
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpd/kroute.c18
1 files changed, 8 insertions, 10 deletions
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 <henning@openbsd.org>
@@ -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);
}