From 7c1450003d0892eda34296237e5f7828dc2a9943 Mon Sep 17 00:00:00 2001 From: Stefan Sperling Date: Thu, 19 Feb 2009 22:00:32 +0000 Subject: 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@ --- usr.sbin/ospf6d/neighbor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/ospf6d') 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 @@ -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 */ -- cgit v1.2.3