summaryrefslogtreecommitdiff
path: root/proto/ospf/topology.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-01-13 19:15:49 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2009-01-13 19:15:49 +0100
commit0844b65d13d7a5928d425e9adaf28de63550a542 (patch)
treefb0070a6eceefddb10ea6860fc0003fc71252290 /proto/ospf/topology.c
parentf15cb99c79034fbd98d90b104bd6267e6c2fec81 (diff)
Fix OSPF protocol error recovery behavior.
When OSPF neighbor state drops down to EXSTART, clear LSA request and retransmit lists, as specified by RFC. I hope that this will prevent oscillations between EXSTART and LOADING states, which sometimes happened. It also contains related fix from Yury Shevchuk that properly resets DB summary list iterator.
Diffstat (limited to 'proto/ospf/topology.c')
-rw-r--r--proto/ospf/topology.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c
index c3f70fd3..a15d2e35 100644
--- a/proto/ospf/topology.c
+++ b/proto/ospf/topology.c
@@ -908,7 +908,7 @@ ospf_dump_lsa(struct top_hash_entry *he, struct proto *p)
case LSA_T_NET:
ln = he->lsa_body;
rts = (u32 *) (ln + 1);
- max = (he->lsa.length - sizeof(struct ospf_lsa_header) -
+ max = (he->lsa.length - sizeof(struct ospf_lsa_header) -
sizeof(struct ospf_lsa_net)) / sizeof(u32);
for (i = 0; i < max; i++)