summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
authorpaul <paul>2003-06-22 08:17:12 +0000
committerpaul <paul>2003-06-22 08:17:12 +0000
commit2e6b0bbbb44f67bd5664e6dd52c7cd4ad9286c06 (patch)
treea6824e9b6fa75336130e1a1bc96a7c99775ef198 /ospfd
parent305100fc0f1d849f2af2bbf813e3e24b87d52ba6 (diff)
2003-06-19 "Suraev, Vadim" <vadim.suraev@terayon.com>
* ospf_interface.c (ospf_vl_set_params): new router LSA is not generated when the cost of the routing entry for the virtual link endpoint has changed. If the cost to reach the virtual link's endpoint has changed, add router LSA timer for the backbone area.
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_interface.c40
1 files changed, 25 insertions, 15 deletions
diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c
index 08bc7fbe..8fa3fd63 100644
--- a/ospfd/ospf_interface.c
+++ b/ospfd/ospf_interface.c
@@ -857,7 +857,7 @@ ospf_vl_delete (struct ospf *ospf, struct ospf_vl_data *vl_data)
ospf_vl_data_free (vl_data);
}
-void
+int
ospf_vl_set_params (struct ospf_vl_data *vl_data, struct vertex *v)
{
int changed = 0;
@@ -891,19 +891,21 @@ ospf_vl_set_params (struct ospf_vl_data *vl_data, struct vertex *v)
for (i = 0; i < ntohs (rl->links); i++)
{
switch (rl->link[i].type)
- {
- case LSA_LINK_TYPE_VIRTUALLINK:
- if (IS_DEBUG_OSPF_EVENT)
- zlog_info ("found back link through VL");
- case LSA_LINK_TYPE_TRANSIT:
- case LSA_LINK_TYPE_POINTOPOINT:
- vl_data->peer_addr = rl->link[i].link_data;
- if (IS_DEBUG_OSPF_EVENT)
- zlog_info ("%s peer address is %s\n",
- vl_data->vl_oi->ifp->name, inet_ntoa(vl_data->peer_addr));
- return;
- }
+ {
+ case LSA_LINK_TYPE_VIRTUALLINK:
+ if (IS_DEBUG_OSPF_EVENT)
+ zlog_info ("found back link through VL");
+ case LSA_LINK_TYPE_TRANSIT:
+ case LSA_LINK_TYPE_POINTOPOINT:
+ vl_data->peer_addr = rl->link[i].link_data;
+ if (IS_DEBUG_OSPF_EVENT)
+ zlog_info ("%s peer address is %s\n",
+ vl_data->vl_oi->ifp->name,
+ inet_ntoa(vl_data->peer_addr));
+ return changed;
+ }
}
+ return changed;
}
@@ -951,10 +953,18 @@ ospf_vl_up_check (struct ospf_area *area, struct in_addr rid,
if (IS_DEBUG_OSPF_EVENT)
zlog_info ("ospf_vl_up_check(): VL is down, waking it up");
SET_FLAG (oi->ifp->flags, IFF_UP);
- OSPF_ISM_EVENT_SCHEDULE (oi, ISM_InterfaceUp);
+ OSPF_ISM_EVENT_EXECUTE(oi,ISM_InterfaceUp);
}
- ospf_vl_set_params (vl_data, v);
+ if (ospf_vl_set_params (vl_data, v))
+ {
+ if (IS_DEBUG_OSPF (ism, ISM_EVENTS))
+ zlog_info ("ospf_vl_up_check: VL cost change, scheduling router lsa refresh");
+ if(ospf->backbone)
+ ospf_router_lsa_timer_add(ospf->backbone);
+ else if (IS_DEBUG_OSPF (ism, ISM_EVENTS))
+ zlog_info ("ospf_vl_up_check: VL cost change, no backbone!");
+ }
}
}
}