summaryrefslogtreecommitdiffstats
path: root/ospfd
diff options
context:
space:
mode:
authorKaren Schoener <karen@voltanet.io>2020-12-09 18:09:18 +0100
committerKaren Schoener <karen@volta.io>2020-12-09 20:11:38 +0100
commit4d1e5644b737663f02db4601b4f6d837a4986ca0 (patch)
tree8b14dc431eb4da7d43313f866de8b07489bcdd2d /ospfd
parentMerge pull request #7686 from volta-networks/fix_ldpsync_igps_detect_client_c... (diff)
downloadfrr-4d1e5644b737663f02db4601b4f6d837a4986ca0.tar.xz
frr-4d1e5644b737663f02db4601b4f6d837a4986ca0.zip
ldpd, isisd, ospfd: Remove periodic ldp-sync hello message
Removing the obsolete ldp-sync periodic 'hello' message. When ldp-sync is configured, IGPs take action if the LDP process goes down. The IGPs have been updated to use the zapi client close callback to detect the LDP process going down. Signed-off-by: Karen Schoener <karen@voltanet.io>
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ospf_ldp_sync.c91
-rw-r--r--ospfd/ospf_ldp_sync.h2
-rw-r--r--ospfd/ospf_zebra.c5
3 files changed, 0 insertions, 98 deletions
diff --git a/ospfd/ospf_ldp_sync.c b/ospfd/ospf_ldp_sync.c
index bca15304b..521b808ec 100644
--- a/ospfd/ospf_ldp_sync.c
+++ b/ospfd/ospf_ldp_sync.c
@@ -93,57 +93,11 @@ int ospf_ldp_sync_announce_update(struct ldp_igp_sync_announce announce)
/* LDP just started up:
* set cost to LSInfinity
* send request to LDP for LDP-SYNC state for each interface
- * start hello timer
*/
vrf = vrf_lookup_by_id(ospf->vrf_id);
FOR_ALL_INTERFACES (vrf, ifp)
ospf_ldp_sync_if_start(ifp, true);
- THREAD_OFF(ospf->ldp_sync_cmd.t_hello);
- ospf->ldp_sync_cmd.sequence = 0;
- ospf_ldp_sync_hello_timer_add(ospf);
-
- return 0;
-}
-
-int ospf_ldp_sync_hello_update(struct ldp_igp_sync_hello hello)
-{
- struct ospf *ospf;
- struct vrf *vrf;
- struct interface *ifp;
-
- /* if ospf is not enabled or LDP-SYNC is not configured ignore */
- ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
- if (ospf == NULL ||
- !CHECK_FLAG(ospf->ldp_sync_cmd.flags, LDP_SYNC_FLAG_ENABLE))
- return 0;
-
- if (hello.proto != ZEBRA_ROUTE_LDP)
- return 0;
-
- /* Received Hello from LDP:
- * if current sequence number is greater than received hello
- * sequence number then assume LDP restarted
- * set cost to LSInfinity
- * send request to LDP for LDP-SYNC state for each interface
- * else all is fine just restart hello timer
- */
- if (hello.sequence == 0)
- /* rolled over */
- ospf->ldp_sync_cmd.sequence = 0;
-
- if (ospf->ldp_sync_cmd.sequence > hello.sequence) {
- zlog_err("ldp_sync: LDP restarted");
-
- vrf = vrf_lookup_by_id(ospf->vrf_id);
- FOR_ALL_INTERFACES (vrf, ifp)
- ospf_ldp_sync_if_start(ifp, true);
- } else {
- THREAD_OFF(ospf->ldp_sync_cmd.t_hello);
- ospf_ldp_sync_hello_timer_add(ospf);
- }
- ospf->ldp_sync_cmd.sequence = hello.sequence;
-
return 0;
}
@@ -448,46 +402,6 @@ void ospf_ldp_sync_holddown_timer_add(struct interface *ifp)
}
/*
- * LDP-SYNC hello timer routines
- */
-static int ospf_ldp_sync_hello_timer(struct thread *thread)
-{
- struct ospf *ospf;
- struct vrf *vrf;
- struct interface *ifp;
-
- /* hello timer expired:
- * didn't receive hello msg from LDP
- * set cost of all interfaces to LSInfinity
- */
- ospf = ospf_lookup_by_vrf_id(VRF_DEFAULT);
- if (ospf) {
- vrf = vrf_lookup_by_id(ospf->vrf_id);
-
- FOR_ALL_INTERFACES (vrf, ifp)
- ospf_ldp_sync_ldp_fail(ifp);
-
- zlog_err("ldp_sync: hello timer expired, LDP down");
- }
- return 0;
-}
-
-void ospf_ldp_sync_hello_timer_add(struct ospf *ospf)
-{
-
- /* Start hello timer:
- * this timer is used to make sure LDP is up
- * if expires set interface cost to LSInfinity
- */
- if (!CHECK_FLAG(ospf->ldp_sync_cmd.flags, LDP_SYNC_FLAG_ENABLE))
- return;
-
- thread_add_timer(master, ospf_ldp_sync_hello_timer,
- NULL, LDP_IGP_SYNC_HELLO_TIMEOUT,
- &ospf->ldp_sync_cmd.t_hello);
-}
-
-/*
* LDP-SYNC exit routes.
*/
void ospf_ldp_sync_gbl_exit(struct ospf *ospf, bool remove)
@@ -496,7 +410,6 @@ void ospf_ldp_sync_gbl_exit(struct ospf *ospf, bool remove)
struct vrf *vrf;
/* ospf is being removed
- * stop hello timer
* stop any holddown timers
*/
if (CHECK_FLAG(ospf->ldp_sync_cmd.flags, LDP_SYNC_FLAG_ENABLE)) {
@@ -505,15 +418,12 @@ void ospf_ldp_sync_gbl_exit(struct ospf *ospf, bool remove)
LDP_IGP_SYNC_IF_STATE_UPDATE);
zclient_unregister_opaque(zclient,
LDP_IGP_SYNC_ANNOUNCE_UPDATE);
- zclient_unregister_opaque(zclient, LDP_IGP_SYNC_HELLO_UPDATE);
/* disable LDP globally */
UNSET_FLAG(ospf->ldp_sync_cmd.flags, LDP_SYNC_FLAG_ENABLE);
UNSET_FLAG(ospf->ldp_sync_cmd.flags, LDP_SYNC_FLAG_HOLDDOWN);
ospf->ldp_sync_cmd.holddown = LDP_IGP_SYNC_HOLDDOWN_DEFAULT;
- THREAD_OFF(ospf->ldp_sync_cmd.t_hello);
-
/* turn off LDP-IGP Sync on all OSPF interfaces */
vrf = vrf_lookup_by_id(ospf->vrf_id);
FOR_ALL_INTERFACES (vrf, ifp)
@@ -856,7 +766,6 @@ DEFPY (ospf_mpls_ldp_sync,
/* register with opaque client to recv LDP-IGP Sync msgs */
zclient_register_opaque(zclient, LDP_IGP_SYNC_IF_STATE_UPDATE);
zclient_register_opaque(zclient, LDP_IGP_SYNC_ANNOUNCE_UPDATE);
- zclient_register_opaque(zclient, LDP_IGP_SYNC_HELLO_UPDATE);
if (!CHECK_FLAG(ospf->ldp_sync_cmd.flags, LDP_SYNC_FLAG_ENABLE)) {
SET_FLAG(ospf->ldp_sync_cmd.flags, LDP_SYNC_FLAG_ENABLE);
diff --git a/ospfd/ospf_ldp_sync.h b/ospfd/ospf_ldp_sync.h
index 418ca4e5b..63f370724 100644
--- a/ospfd/ospf_ldp_sync.h
+++ b/ospfd/ospf_ldp_sync.h
@@ -40,7 +40,6 @@ extern void ospf_ldp_sync_if_remove(struct interface *ifp, bool remove);
extern void ospf_ldp_sync_if_down(struct interface *ifp);
extern void ospf_ldp_sync_if_complete(struct interface *ifp);
extern void ospf_ldp_sync_holddown_timer_add(struct interface *ifp);
-extern void ospf_ldp_sync_hello_timer_add(struct ospf *ospf);
extern void ospf_ldp_sync_ldp_fail(struct interface *ifp);
extern void ospf_ldp_sync_show_info(struct vty *vty, struct ospf *ospf,
json_object *json_vrf, bool use_json);
@@ -49,7 +48,6 @@ extern void ospf_ldp_sync_if_write_config(struct vty *vty,
struct ospf_if_params *params);
extern int ospf_ldp_sync_state_update(struct ldp_igp_sync_if_state state);
extern int ospf_ldp_sync_announce_update(struct ldp_igp_sync_announce announce);
-extern int ospf_ldp_sync_hello_update(struct ldp_igp_sync_hello hello);
extern void
ospf_ldp_sync_handle_client_close(struct zapi_client_close_info *info);
extern void ospf_ldp_sync_state_req_msg(struct interface *ifp);
diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c
index 93d4ee0ec..2d02619ae 100644
--- a/ospfd/ospf_zebra.c
+++ b/ospfd/ospf_zebra.c
@@ -1956,7 +1956,6 @@ static int ospf_opaque_msg_handler(ZAPI_CALLBACK_ARGS)
struct zapi_opaque_msg info;
struct ldp_igp_sync_if_state state;
struct ldp_igp_sync_announce announce;
- struct ldp_igp_sync_hello hello;
int ret = 0;
s = zclient->ibuf;
@@ -1973,10 +1972,6 @@ static int ospf_opaque_msg_handler(ZAPI_CALLBACK_ARGS)
STREAM_GET(&announce, s, sizeof(announce));
ret = ospf_ldp_sync_announce_update(announce);
break;
- case LDP_IGP_SYNC_HELLO_UPDATE:
- STREAM_GET(&hello, s, sizeof(hello));
- ret = ospf_ldp_sync_hello_update(hello);
- break;
default:
break;
}