summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_spf.c
diff options
context:
space:
mode:
authorDinesh Dutt <ddutt@cumulusnetworks.com>2013-08-24 10:00:37 +0200
committerDavid Lamparter <equinox@opensourcerouting.org>2013-11-08 03:15:43 +0100
commitf41b4a021659dd48d62b1a7aac4b28e3663dbdaa (patch)
treeec4595f0d79279eef4da07145a30d104604b0035 /ospf6d/ospf6_spf.c
parentospf6d: fix linkdown handling (diff)
downloadfrr-f41b4a021659dd48d62b1a7aac4b28e3663dbdaa.tar.xz
frr-f41b4a021659dd48d62b1a7aac4b28e3663dbdaa.zip
ospf6d: add overload support
OSPFv3: Support setting/clearing overload bit on router It is sometimes necessary for a router to gracefully remove itself from the SPF tree i.e. it cannot act as a transit router. It does this by setting the overload bit in the router LSA. This patch adds support for enabling/disabling the overload bit. Signed-off-by: Dinesh G Dutt <ddutt at cumulusnetworks.com> Reviewed-by: Pradosh Mohapatra <pmohapat at cumulusnetworks.com> [DL: patch applied with fuzz] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'ospf6d/ospf6_spf.c')
-rw-r--r--ospf6d/ospf6_spf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ospf6d/ospf6_spf.c b/ospf6d/ospf6_spf.c
index e4c424dbb..845e206c4 100644
--- a/ospf6d/ospf6_spf.c
+++ b/ospf6d/ospf6_spf.c
@@ -424,6 +424,11 @@ ospf6_spf_calculation (u_int32_t router_id,
if (ospf6_spf_install (v, result_table) < 0)
continue;
+ /* Skip overloaded routers */
+ if ((OSPF6_LSA_IS_TYPE (ROUTER, v->lsa) &&
+ ospf6_router_is_stub_router (v->lsa)))
+ continue;
+
/* For each LS description in the just-added vertex V's LSA */
size = (VERTEX_IS_TYPE (ROUTER, v) ?
sizeof (struct ospf6_router_lsdesc) :