]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Now I can change cost of interface without OSPF restart.
authorOndrej Filip <feela@network.cz>
Wed, 7 Jun 2000 13:46:13 +0000 (13:46 +0000)
committerOndrej Filip <feela@network.cz>
Wed, 7 Jun 2000 13:46:13 +0000 (13:46 +0000)
proto/ospf/ospf.c

index 1bc8e7478e55d42edd24d131e9f5bbf9b1331d8d..ef06c70981307a7224afd3d30b49219d823201d3 100644 (file)
@@ -351,7 +351,7 @@ ospf_get_attr(eattr *a, byte *buf)
 static int
 ospf_patt_compare(struct ospf_iface_patt *a, struct ospf_iface_patt *b)
 {
-  return ((a->cost==b->cost)&&(a->type==b->type)&&(a->priority==b->priority));
+  return ((a->type==b->type)&&(a->priority==b->priority));
 }
 
 static int
@@ -418,6 +418,16 @@ ospf_reconfigure(struct proto *p, struct proto_config *c)
            ifa->iface->name,ip1->helloint,ip2->helloint);
        }
 
+       /* COST */
+       if(ip1->cost!=ip2->cost)
+       {
+         ifa->cost=ip2->cost;
+         OSPF_TRACE(D_EVENTS,
+           "Changing cost interface %s from %d to %d",
+           ifa->iface->name,ip1->cost,ip2->cost);
+         schedule_rt_lsa(ifa->oa);
+       }
+
        /* AUTHETICATION */
        if(ip1->autype!=ip2->autype)
        {