diff options
| author | Renato Westphal <renato@opensourcerouting.org> | 2017-03-30 11:33:08 -0300 |
|---|---|---|
| committer | Renato Westphal <renato@opensourcerouting.org> | 2017-03-31 13:51:53 -0300 |
| commit | 1d75a89d8553caab99e58668af30a9803d40d49b (patch) | |
| tree | bdfdc77f6f84973d2fe3e27a1da6d0fa1b75a322 /ldpd/ldpe.c | |
| parent | 7d0eeac1a154b76ff55c1ad53ae97a05a3ca977a (diff) | |
ldpd: do not consume vty_conf when updating the configuration
David Lamparter gave the idea of keeping vty_conf as a permanent copy of
ldpd_conf in order to simplify the CLI code and facilitate the integration
with his cap'n proto framework in the future. Doing this demanded quite
some effort but it was worth it as the code looks much better now.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'ldpd/ldpe.c')
| -rw-r--r-- | ldpd/ldpe.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/ldpd/ldpe.c b/ldpd/ldpe.c index f8e9abab02..1bec3d2a95 100644 --- a/ldpd/ldpe.c +++ b/ldpd/ldpe.c @@ -452,12 +452,6 @@ ldpe_dispatch_main(struct thread *thread) fatal(NULL); memcpy(niface, imsg.data, sizeof(struct iface)); - LIST_INIT(&niface->addr_list); - RB_INIT(&niface->ipv4.adj_tree); - RB_INIT(&niface->ipv6.adj_tree); - niface->ipv4.iface = niface; - niface->ipv6.iface = niface; - RB_INSERT(iface_head, &nconf->iface_tree, niface); break; case IMSG_RECONF_TNBR: @@ -490,7 +484,6 @@ ldpe_dispatch_main(struct thread *thread) fatal(NULL); memcpy(nlif, imsg.data, sizeof(struct l2vpn_if)); - nlif->l2vpn = nl2vpn; RB_INSERT(l2vpn_if_head, &nl2vpn->if_tree, nlif); break; case IMSG_RECONF_L2VPN_PW: @@ -498,7 +491,6 @@ ldpe_dispatch_main(struct thread *thread) fatal(NULL); memcpy(npw, imsg.data, sizeof(struct l2vpn_pw)); - npw->l2vpn = nl2vpn; RB_INSERT(l2vpn_pw_head, &nl2vpn->pw_tree, npw); break; case IMSG_RECONF_L2VPN_IPW: @@ -506,11 +498,11 @@ ldpe_dispatch_main(struct thread *thread) fatal(NULL); memcpy(npw, imsg.data, sizeof(struct l2vpn_pw)); - npw->l2vpn = nl2vpn; RB_INSERT(l2vpn_pw_head, &nl2vpn->pw_inactive_tree, npw); break; case IMSG_RECONF_END: merge_config(leconf, nconf); + ldp_clear_config(nconf); nconf = NULL; global.conf_seqnum++; break; |
