summaryrefslogtreecommitdiff
path: root/usr.sbin/ospf6d
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2009-02-19 22:00:32 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2009-02-19 22:00:32 +0000
commit7c1450003d0892eda34296237e5f7828dc2a9943 (patch)
treea9c3d435c55484a94a792f1c1c85fde6d79250b3 /usr.sbin/ospf6d
parent78393eced381b92023c2b47c5933484e6c0a7313 (diff)
Make ospfe send correct nbr state to RDE.
ospfe was sending state from a local variable which does not always reflect the true state of the neighbour. The RDE would end up with an invalid nbr state of zero in some situations. Send state saved in nbr structure instead, this is always valid. ok claudio@
Diffstat (limited to 'usr.sbin/ospf6d')
-rw-r--r--usr.sbin/ospf6d/neighbor.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ospf6d/neighbor.c b/usr.sbin/ospf6d/neighbor.c
index df5a902a3e9..8407c02887c 100644
--- a/usr.sbin/ospf6d/neighbor.c
+++ b/usr.sbin/ospf6d/neighbor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: neighbor.c,v 1.8 2009/01/27 21:58:28 stsp Exp $ */
+/* $OpenBSD: neighbor.c,v 1.9 2009/02/19 22:00:31 stsp Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -197,7 +197,7 @@ nbr_fsm(struct nbr *nbr, enum nbr_event event)
nbr->stats.sta_chng++;
/* state change inform RDE */
ospfe_imsg_compose_rde(IMSG_NEIGHBOR_CHANGE,
- nbr->peerid, 0, &new_state, sizeof(new_state));
+ nbr->peerid, 0, &nbr->state, sizeof(nbr->state));
if (old_state & NBR_STA_FULL || nbr->state & NBR_STA_FULL) {
extern struct ospfd_conf *oeconf; /* XXX */