summaryrefslogtreecommitdiff
path: root/proto/ospf/ospf.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-06-27 19:04:22 +0200
committerMaria Matejka <mq@ucw.cz>2022-06-27 19:04:24 +0200
commitbeb5f78ada79ac90f31f2c4923302c74d9ab38bf (patch)
treeb6f37568d57428d7bc9df103c84922b1076e1f5e /proto/ospf/ospf.c
parentb867c798c3e42c875311a79fe53a36d4a5bfd126 (diff)
Preexport callback now takes the channel instead of protocol as argument
Passing protocol to preexport was in fact a historical relic from the old times when channels weren't a thing. Refactoring that to match current extensibility needs.
Diffstat (limited to 'proto/ospf/ospf.c')
-rw-r--r--proto/ospf/ospf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index ba8c2e2b..42ffdb06 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -107,7 +107,7 @@
#include <stdlib.h>
#include "ospf.h"
-static int ospf_preexport(struct proto *P, rte **new, struct linpool *pool);
+static int ospf_preexport(struct channel *C, rte **new, struct linpool *pool);
static void ospf_make_tmp_attrs(struct rte *rt, struct linpool *pool);
static void ospf_store_tmp_attrs(struct rte *rt, struct linpool *pool);
static void ospf_reload_routes(struct channel *C);
@@ -484,14 +484,14 @@ ospf_disp(timer * timer)
* import to the filters.
*/
static int
-ospf_preexport(struct proto *P, rte **new, struct linpool *pool UNUSED)
+ospf_preexport(struct channel *C, rte **new, struct linpool *pool UNUSED)
{
- struct ospf_proto *p = (struct ospf_proto *) P;
+ struct ospf_proto *p = (struct ospf_proto *) C->proto;
struct ospf_area *oa = ospf_main_area(p);
rte *e = *new;
/* Reject our own routes */
- if (e->attrs->src->proto == P)
+ if (e->attrs->src->proto == &p->p)
return -1;
/* Do not export routes to stub areas */