Import control implemented.
This commit is contained in:
parent
216fd83c4b
commit
2d5b999236
2 changed files with 14 additions and 1 deletions
|
@ -67,6 +67,7 @@ ospf_init(struct proto_config *c)
|
||||||
p->if_notify = NULL;
|
p->if_notify = NULL;
|
||||||
init_list(&(po->iface_list));
|
init_list(&(po->iface_list));
|
||||||
init_list(&(po->area_list));
|
init_list(&(po->area_list));
|
||||||
|
p->import_control = ospf_import_control;
|
||||||
|
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
@ -116,6 +117,18 @@ ospf_postconfig(struct proto_config *c)
|
||||||
DBG( " OSPF: postconfig\n" );
|
DBG( " OSPF: postconfig\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
ospf_import_control(struct proto *p, rte **new, ea_list **attrs, struct linpool *pool)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
rte *e=*new;
|
||||||
|
struct proto_ospf *po=(struct proto_ospf *)p;
|
||||||
|
|
||||||
|
if(p==e->attrs->proto) return -1;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
struct protocol proto_ospf = {
|
struct protocol proto_ospf = {
|
||||||
name: "OSPF",
|
name: "OSPF",
|
||||||
template: "ospf%d",
|
template: "ospf%d",
|
||||||
|
|
|
@ -351,7 +351,7 @@ static void ospf_preconfig(struct protocol *p, struct config *c);
|
||||||
static void ospf_postconfig(struct proto_config *c);
|
static void ospf_postconfig(struct proto_config *c);
|
||||||
static int ospf_rte_better(struct rte *new, struct rte *old);
|
static int ospf_rte_better(struct rte *new, struct rte *old);
|
||||||
static int ospf_rte_same(struct rte *new, struct rte *old);
|
static int ospf_rte_same(struct rte *new, struct rte *old);
|
||||||
|
int ospf_import_control(struct proto *p, rte **new, ea_list **attrs, struct linpool *pool);
|
||||||
|
|
||||||
#include "proto/ospf/hello.h"
|
#include "proto/ospf/hello.h"
|
||||||
#include "proto/ospf/packet.h"
|
#include "proto/ospf/packet.h"
|
||||||
|
|
Loading…
Reference in a new issue