diff options
author | Karen Schoener <karen@voltanet.io> | 2020-07-22 18:10:59 +0200 |
---|---|---|
committer | lynne <lynne@voltanet.io> | 2020-09-09 16:45:41 +0200 |
commit | e1894ff70f77f39ae993f875a96d6cb1282ffd1a (patch) | |
tree | 2b626ddfa147660799e092679808e6e5fd6c055e /ldpd/ldpd.c | |
parent | Merge pull request #5702 from vishaldhingra/bgp_nb (diff) | |
download | frr-e1894ff70f77f39ae993f875a96d6cb1282ffd1a.tar.xz frr-e1894ff70f77f39ae993f875a96d6cb1282ffd1a.zip |
ldpd: Adding support for LDP IGP Synchronization
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
Diffstat (limited to 'ldpd/ldpd.c')
-rw-r--r-- | ldpd/ldpd.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ldpd/ldpd.c b/ldpd/ldpd.c index 927c3a3c0..1c83ffb35 100644 --- a/ldpd/ldpd.c +++ b/ldpd/ldpd.c @@ -586,6 +586,13 @@ main_dispatch_ldpe(struct thread *thread) fatalx("IMSG_ACL_CHECK imsg with wrong len"); ldp_acl_reply(iev, (struct acl_check *)imsg.data); break; + case IMSG_LDP_SYNC_IF_STATE_UPDATE: + if (imsg.hdr.len != IMSG_HEADER_SIZE + + sizeof(struct ldp_igp_sync_if_state)) + fatalx("IMSG_LDP_SYNC_IF_STATE_UPDATE imsg with wrong len"); + + ldp_sync_zebra_send_state_update((struct ldp_igp_sync_if_state *)imsg.data); + break; default: log_debug("%s: error handling imsg %d", __func__, imsg.hdr.type); @@ -1148,6 +1155,7 @@ ldp_config_reset_main(struct ldpd_conf *conf) conf->lhello_interval = DEFAULT_HELLO_INTERVAL; conf->thello_holdtime = TARGETED_DFLT_HOLDTIME; conf->thello_interval = DEFAULT_HELLO_INTERVAL; + conf->wait_for_sync_interval = DFLT_WAIT_FOR_SYNC; conf->trans_pref = DUAL_STACK_LDPOV6; conf->flags = 0; } @@ -1278,6 +1286,14 @@ merge_config(struct ldpd_conf *conf, struct ldpd_conf *xconf) static void merge_global(struct ldpd_conf *conf, struct ldpd_conf *xconf) { + /* Removing global LDP config requires resetting LDP IGP Sync FSM */ + if ((conf->flags & F_LDPD_ENABLED) && + (!(xconf->flags & F_LDPD_ENABLED))) + { + if (ldpd_process == PROC_LDP_ENGINE) + ldp_sync_fsm_reset_all(); + } + /* change of router-id requires resetting all neighborships */ if (conf->rtr_id.s_addr != xconf->rtr_id.s_addr) { if (ldpd_process == PROC_LDP_ENGINE) { @@ -1303,6 +1319,7 @@ merge_global(struct ldpd_conf *conf, struct ldpd_conf *xconf) conf->lhello_interval = xconf->lhello_interval; conf->thello_holdtime = xconf->thello_holdtime; conf->thello_interval = xconf->thello_interval; + conf->wait_for_sync_interval = xconf->wait_for_sync_interval; if (conf->trans_pref != xconf->trans_pref) { if (ldpd_process == PROC_LDP_ENGINE) |