summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2005-10-13 09:36:38 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2005-10-13 09:36:38 +0000
commit447ffeddc6b7b161bf77f86b24d8bc7f9e76bb19 (patch)
tree21964280284dd2c7af33f387abba7688a1a470c8
parent649b3dc312e701d1efd50a197d84f900b62694f7 (diff)
Correctly queue ls updates on the retransmission lists.
First of all it is not clever to set queued before we actually queue something -- unless queued is set. If ospfd is running as BDR don't add updates to the retransmission list to the DR. OK norby@
-rw-r--r--usr.sbin/ospfd/lsupdate.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/lsupdate.c b/usr.sbin/ospfd/lsupdate.c
index 3b25614b13a..0f458ec89ad 100644
--- a/usr.sbin/ospfd/lsupdate.c
+++ b/usr.sbin/ospfd/lsupdate.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lsupdate.c,v 1.13 2005/10/12 10:16:01 claudio Exp $ */
+/* $OpenBSD: lsupdate.c,v 1.14 2005/10/13 09:36:37 claudio Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -80,12 +80,21 @@ lsa_flood(struct iface *iface, struct nbr *originator, struct lsa_hdr *lsa_hdr,
continue;
}
- queued = 1;
+ /* non DR or BDR router keep all lsa in one retrans list */
if (iface->state & IF_STA_DROTHER) {
if (!queued)
ls_retrans_list_add(iface->self, data);
- } else
+ queued = 1;
+ } else if (iface->dr != nbr) {
+ /*
+ * DR and BDR queue a packet to all other routers
+ * exept to the DR. The BDR does not need to
+ * retransmit LSA to the DR -- this will be done
+ * by the originatior.
+ */
ls_retrans_list_add(nbr, data);
+ queued = 1;
+ }
}
if (!queued)