summaryrefslogtreecommitdiff
path: root/proto/ospf/rt.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2005-02-20 16:53:06 +0000
committerOndrej Filip <feela@network.cz>2005-02-20 16:53:06 +0000
commitdafaef9ba9e7b46b9ff42b2cb75954a86f920951 (patch)
tree3cdb606a2d42c7f611ad9fbab4f831f98c0d638c /proto/ospf/rt.c
parent028a4cfc02f425de34323082d800a39b7bbc51de (diff)
Originate default route into stub areas.
Diffstat (limited to 'proto/ospf/rt.c')
-rw-r--r--proto/ospf/rt.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/proto/ospf/rt.c b/proto/ospf/rt.c
index 653e594f..c2f7ca0e 100644
--- a/proto/ospf/rt.c
+++ b/proto/ospf/rt.c
@@ -1049,10 +1049,24 @@ again2:
if ((oa == po->backbone) && oaa->trcap) fl = 1;
+ if (oaa->stub) fl = 1;
+
if(fl) flush_sum_lsa(oaa, &anet->fn, ORT_NET);
else originate_sum_lsa(oaa, &anet->fn, ORT_NET, anet->metric);
}
}
FIB_WALK_END;
+
+ /* Check default summary LSA for stub areas
+ * just for router connected to backbone */
+ if (po->backbone)
+ {
+ struct fib_node fnn;
+
+ fnn.prefix = IPA_NONE;
+ fnn.pxlen = 0;
+ if(oa->stub) originate_sum_lsa(oa, &fnn, ORT_NET, oa->stub);
+ else flush_sum_lsa(oa, &fnn, ORT_NET);
+ }
}
}