summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2008-12-28 17:44:46 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2008-12-28 17:44:46 +0000
commit06bfb4ec5a249fc20c46245bcd509d79d48cbb4a (patch)
treefd03df7ed70305a0de8cad0e1f9043344381b23f
parentc82c4578a10f30be9740984b8c580035dd1be319 (diff)
Correctly sync the FSM by issuing the NBR_EVT_NEG_DONE event before sending
possible database desciption files to the RDE. NBR_EVT_NEG_DONE sends an imsg to the RDE to bring the RDE in the correct state for the database exchange when doing this the wrong way the RDE will issue errors. From ospfd (rev. 1.23 of database.c) via Stefan Sperling
-rw-r--r--usr.sbin/ospf6d/database.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/usr.sbin/ospf6d/database.c b/usr.sbin/ospf6d/database.c
index e5be1475a8b..5000a2f7007 100644
--- a/usr.sbin/ospf6d/database.c
+++ b/usr.sbin/ospf6d/database.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: database.c,v 1.7 2008/02/11 13:48:39 norby Exp $ */
+/* $OpenBSD: database.c,v 1.8 2008/12/28 17:44:45 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -233,16 +233,15 @@ recv_db_description(struct nbr *nbr, char *buf, u_int16_t len)
}
nbr->dd_seq_num++;
+ /* event negotiation done */
+ nbr_fsm(nbr, NBR_EVT_NEG_DONE);
+
/* this packet may already have data so pass it on */
if (len > 0) {
nbr->dd_pending++;
ospfe_imsg_compose_rde(IMSG_DD, nbr->peerid,
0, buf, len);
}
-
- /* event negotiation done */
- nbr_fsm(nbr, NBR_EVT_NEG_DONE);
-
} else {
/* ignore packet */
log_debug("recv_db_description: packet ignored in "