summaryrefslogtreecommitdiffstats
path: root/proto/ospf/ospf.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-06-07 15:46:13 +0200
committerOndrej Filip <feela@network.cz>2000-06-07 15:46:13 +0200
commitfa6c2405e2bab551245e1af7ed19b550b8bbef79 (patch)
tree854f499b016573a5a3a14d62f378268aa8780500 /proto/ospf/ospf.c
parent6316555eea2b9b232a622fdb9aceaa4de1e23f59 (diff)
downloadbird-fa6c2405e2bab551245e1af7ed19b550b8bbef79.tar
bird-fa6c2405e2bab551245e1af7ed19b550b8bbef79.zip
Now I can change cost of interface without OSPF restart.
Diffstat (limited to 'proto/ospf/ospf.c')
-rw-r--r--proto/ospf/ospf.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index 1bc8e74..ef06c70 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -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)
{