diff options
author | Stefan Sperling <stsp@cvs.openbsd.org> | 2009-01-03 00:23:51 +0000 |
---|---|---|
committer | Stefan Sperling <stsp@cvs.openbsd.org> | 2009-01-03 00:23:51 +0000 |
commit | 5144f86470fe8a2689da5da59cdf3c804bb4bed3 (patch) | |
tree | 8f201c56c54014bcad8f9e08d54c2fb3e521696f | |
parent | 1a4470b69096b9c76b4484f00a41f0286e0d6870 (diff) |
Since link LSAs live in iface->lsa_tree and not in area->lsa_tree,
we had better include LSAs from iface->lsa_tree when sending
DB summaries. Fixes initial flood of link LSAs.
ok claudio@
-rw-r--r-- | usr.sbin/ospf6d/rde.c | 4 | ||||
-rw-r--r-- | usr.sbin/ospf6d/rde.h | 4 | ||||
-rw-r--r-- | usr.sbin/ospf6d/rde_lsdb.c | 15 |
3 files changed, 14 insertions, 9 deletions
diff --git a/usr.sbin/ospf6d/rde.c b/usr.sbin/ospf6d/rde.c index cdbc3a04031..21abaa74213 100644 --- a/usr.sbin/ospf6d/rde.c +++ b/usr.sbin/ospf6d/rde.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.c,v 1.13 2008/12/30 21:31:54 claudio Exp $ */ +/* $OpenBSD: rde.c,v 1.14 2009/01/03 00:23:50 stsp Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -294,7 +294,7 @@ rde_dispatch_imsg(int fd, short event, void *bula) if (nbr == NULL) break; - lsa_snap(nbr->area, imsg.hdr.peerid); + lsa_snap(nbr, imsg.hdr.peerid); imsg_compose(ibuf_ospfe, IMSG_DB_END, imsg.hdr.peerid, 0, NULL, 0); diff --git a/usr.sbin/ospf6d/rde.h b/usr.sbin/ospf6d/rde.h index 346b1a28dba..0a8b2ec6333 100644 --- a/usr.sbin/ospf6d/rde.h +++ b/usr.sbin/ospf6d/rde.h @@ -1,4 +1,4 @@ -/* $OpenBSD: rde.h,v 1.6 2008/12/30 22:24:34 claudio Exp $ */ +/* $OpenBSD: rde.h,v 1.7 2009/01/03 00:23:50 stsp Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -141,7 +141,7 @@ void lsa_age(struct vertex *); struct vertex *lsa_find(struct iface *, u_int16_t, u_int32_t, u_int32_t); struct vertex *lsa_find_net(struct area *area, u_int32_t); u_int16_t lsa_num_links(struct vertex *); -void lsa_snap(struct area *, u_int32_t); +void lsa_snap(struct rde_nbr *, u_int32_t); void lsa_dump(struct lsa_tree *, int, pid_t); void lsa_merge(struct rde_nbr *, struct lsa *, struct vertex *); void lsa_remove_invalid_sums(struct area *); diff --git a/usr.sbin/ospf6d/rde_lsdb.c b/usr.sbin/ospf6d/rde_lsdb.c index 2337e950a2b..a3ee2b3a978 100644 --- a/usr.sbin/ospf6d/rde_lsdb.c +++ b/usr.sbin/ospf6d/rde_lsdb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rde_lsdb.c,v 1.13 2008/12/30 22:24:34 claudio Exp $ */ +/* $OpenBSD: rde_lsdb.c,v 1.14 2009/01/03 00:23:50 stsp Exp $ */ /* * Copyright (c) 2004, 2005 Claudio Jeker <claudio@openbsd.org> @@ -582,9 +582,9 @@ lsa_num_links(struct vertex *v) } void -lsa_snap(struct area *area, u_int32_t peerid) +lsa_snap(struct rde_nbr *nbr, u_int32_t peerid) { - struct lsa_tree *tree = &area->lsa_tree; + struct lsa_tree *tree = &nbr->area->lsa_tree; struct vertex *v; do { @@ -600,9 +600,14 @@ lsa_snap(struct area *area, u_int32_t peerid) 0, &v->lsa->hdr, sizeof(struct lsa_hdr)); } } - if (tree != &area->lsa_tree) + if (tree == &asext_tree) break; - tree = &asext_tree; + if (tree == &nbr->area->lsa_tree) { + tree = &nbr->iface->lsa_tree; + continue; + } else + tree = &asext_tree; + } while (1); } |