]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
rte_same implemented.
authorOndrej Filip <feela@network.cz>
Wed, 17 May 2000 20:01:25 +0000 (20:01 +0000)
committerOndrej Filip <feela@network.cz>
Wed, 17 May 2000 20:01:25 +0000 (20:01 +0000)
proto/ospf/ospf.c
proto/ospf/ospf.h

index e73e1ceab548f5ff7ca7ea792cc0683af86d3baf..2cbd9648169e0ad30979c3c39a647c82e63fdea8 100644 (file)
@@ -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)
 {
index 7214a00d6da88526e8f906001f5149352ac72a9c..8645e710d3d6b8ae2163d5310afb9d0301e9c173 100644 (file)
@@ -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_postconfig(struct proto_config *c);
 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"