rte_same implemented.
This commit is contained in:
parent
bbd76b421a
commit
00c1f79a79
2 changed files with 13 additions and 0 deletions
|
@ -16,6 +16,7 @@ ospf_start(struct proto *p)
|
||||||
|
|
||||||
p->if_notify=ospf_if_notify;
|
p->if_notify=ospf_if_notify;
|
||||||
p->rte_better=ospf_rte_better;
|
p->rte_better=ospf_rte_better;
|
||||||
|
p->rte_same=ospf_rte_same;
|
||||||
fib_init(&po->efib,p->pool,sizeof(struct extfib),16,init_efib);
|
fib_init(&po->efib,p->pool,sizeof(struct extfib),16,init_efib);
|
||||||
|
|
||||||
return PS_UP;
|
return PS_UP;
|
||||||
|
@ -98,6 +99,17 @@ ospf_rte_better(struct rte *new, struct rte *old)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
ospf_rte_same(struct rte *new, struct rte *old)
|
||||||
|
{
|
||||||
|
struct proto *p = new->attrs->proto;
|
||||||
|
|
||||||
|
if(new->attrs->source!=old->attrs->source) return 0;
|
||||||
|
if(new->u.ospf.metric1!=old->u.ospf.metric1) return 0;
|
||||||
|
if(new->u.ospf.metric2!=old->u.ospf.metric2) return 0;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
ospf_postconfig(struct proto_config *c)
|
ospf_postconfig(struct proto_config *c)
|
||||||
{
|
{
|
||||||
|
|
|
@ -350,6 +350,7 @@ static struct proto *ospf_init(struct proto_config *c);
|
||||||
static void ospf_preconfig(struct protocol *p, struct config *c);
|
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);
|
||||||
|
|
||||||
|
|
||||||
#include "proto/ospf/hello.h"
|
#include "proto/ospf/hello.h"
|
||||||
|
|
Loading…
Reference in a new issue