summaryrefslogtreecommitdiffstats
path: root/proto/ospf/ospf.c
diff options
context:
space:
mode:
Diffstat (limited to 'proto/ospf/ospf.c')
-rw-r--r--proto/ospf/ospf.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index 4c2f1c2..920f84f 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -77,6 +77,7 @@
#include "ospf.h"
+static int ospf_reload_routes(struct proto *p);
static void ospf_rt_notify(struct proto *p, net * n, rte * new, rte * old UNUSED, ea_list * attrs);
static void ospf_ifa_notify(struct proto *p, unsigned flags, struct ifa *a);
static int ospf_rte_better(struct rte *new, struct rte *old);
@@ -234,9 +235,10 @@ ospf_init(struct proto_config *c)
{
struct proto *p = proto_new(c, sizeof(struct proto_ospf));
- p->import_control = ospf_import_control;
p->make_tmp_attrs = ospf_make_tmp_attrs;
p->store_tmp_attrs = ospf_store_tmp_attrs;
+ p->import_control = ospf_import_control;
+ p->reload_routes = ospf_reload_routes;
p->accept_ra_types = RA_OPTIMAL;
p->rt_notify = ospf_rt_notify;
p->if_notify = ospf_iface_notify;
@@ -345,6 +347,19 @@ schedule_rtcalc(struct proto_ospf *po)
po->calcrt = 1;
}
+static int
+ospf_reload_routes(struct proto *p)
+{
+ struct proto_ospf *po = (struct proto_ospf *) p;
+
+ if (po->calcrt != 2)
+ OSPF_TRACE(D_EVENTS, "Scheduling routing table calculation with route reload");
+
+ po->calcrt = 2;
+
+ return 1;
+}
+
/**
* area_disp - invokes origination of
* router LSA and routing table cleanup