diff options
author | Ondrej Filip <feela@network.cz> | 2000-05-17 20:01:25 +0000 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2000-05-17 20:01:25 +0000 |
commit | 00c1f79a79281c16beec132d945db480daca958d (patch) | |
tree | 8d3aad7290fec3d49fe408f7a1a4abffefac163b /proto/ospf/ospf.c | |
parent | bbd76b421a1975560084e50669db9cacd61d2b58 (diff) |
rte_same implemented.
Diffstat (limited to 'proto/ospf/ospf.c')
-rw-r--r-- | proto/ospf/ospf.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c index e73e1cea..2cbd9648 100644 --- a/proto/ospf/ospf.c +++ b/proto/ospf/ospf.c @@ -16,6 +16,7 @@ ospf_start(struct proto *p) p->if_notify=ospf_if_notify; p->rte_better=ospf_rte_better; + p->rte_same=ospf_rte_same; fib_init(&po->efib,p->pool,sizeof(struct extfib),16,init_efib); 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 ospf_postconfig(struct proto_config *c) { |