summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_area.c
diff options
context:
space:
mode:
authorDinesh Dutt <ddutt@cumulusnetworks.com>2013-08-24 08:00:37 +0000
committerDavid Lamparter <equinox@opensourcerouting.org>2013-11-07 18:15:43 -0800
commitf41b4a021659dd48d62b1a7aac4b28e3663dbdaa (patch)
treeec4595f0d79279eef4da07145a30d104604b0035 /ospf6d/ospf6_area.c
parente7ad6b20d7a7c63ed7c640ab9f61c853e77508c5 (diff)
downloadquagga-f41b4a021659dd48d62b1a7aac4b28e3663dbdaa.tar.bz2
quagga-f41b4a021659dd48d62b1a7aac4b28e3663dbdaa.tar.xz
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_area.c')
-rw-r--r--ospf6d/ospf6_area.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/ospf6d/ospf6_area.c b/ospf6d/ospf6_area.c
index 1e07d857..37e5c004 100644
--- a/ospf6d/ospf6_area.c
+++ b/ospf6d/ospf6_area.c
@@ -164,9 +164,18 @@ ospf6_area_create (u_int32_t area_id, struct ospf6 *o)
oa->summary_router->scope = oa;
/* set default options */
- OSPF6_OPT_SET (oa->options, OSPF6_OPT_V6);
+ if (CHECK_FLAG (o->flag, OSPF6_STUB_ROUTER))
+ {
+ OSPF6_OPT_CLEAR (oa->options, OSPF6_OPT_V6);
+ OSPF6_OPT_CLEAR (oa->options, OSPF6_OPT_R);
+ }
+ else
+ {
+ OSPF6_OPT_SET (oa->options, OSPF6_OPT_V6);
+ OSPF6_OPT_SET (oa->options, OSPF6_OPT_R);
+ }
+
OSPF6_OPT_SET (oa->options, OSPF6_OPT_E);
- OSPF6_OPT_SET (oa->options, OSPF6_OPT_R);
oa->ospf6 = o;
listnode_add_sort (o->area_list, oa);