summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/ldpd.c
diff options
context:
space:
mode:
authorRenato Westphal <renato@cvs.openbsd.org>2016-06-08 23:30:08 +0000
committerRenato Westphal <renato@cvs.openbsd.org>2016-06-08 23:30:08 +0000
commitcb55fe595fc7409d02f6f5535c1f50845f474136 (patch)
tree1248903e6a2caf511cd08ff10194cd03c339dbac /usr.sbin/ldpd/ldpd.c
parent2205165babde0e7e7932792888f4a6cf6624e97e (diff)
Fix quick reconnect when the transport address is changed.
When the transport address is changed, we can't try to reconnect to the neighbors inside merge_af() because the ldpe process still didn't receive the new network sockets from the parent at this point. To resolve this, try to reconnect just after we receive these sockets.
Diffstat (limited to 'usr.sbin/ldpd/ldpd.c')
-rw-r--r--usr.sbin/ldpd/ldpd.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/usr.sbin/ldpd/ldpd.c b/usr.sbin/ldpd/ldpd.c
index 4c20b15479a..fa18779a515 100644
--- a/usr.sbin/ldpd/ldpd.c
+++ b/usr.sbin/ldpd/ldpd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpd.c,v 1.50 2016/06/06 16:42:41 renato Exp $ */
+/* $OpenBSD: ldpd.c,v 1.51 2016/06/08 23:30:07 renato Exp $ */
/*
* Copyright (c) 2013, 2016 Renato Westphal <renato@openbsd.org>
@@ -810,8 +810,6 @@ merge_global(struct ldpd_conf *conf, struct ldpd_conf *xconf)
static void
merge_af(int af, struct ldpd_af_conf *af_conf, struct ldpd_af_conf *xa)
{
- struct nbr *nbr;
- struct nbr_params *nbrp;
int egress_label_changed = 0;
if (af_conf->keepalive != xa->keepalive) {
@@ -854,21 +852,6 @@ merge_af(int af, struct ldpd_af_conf *af_conf, struct ldpd_af_conf *xa)
if (ldpd_process == PROC_MAIN)
imsg_compose_event(iev_ldpe, IMSG_CLOSE_SOCKETS, af,
0, -1, NULL, 0);
- if (ldpd_process == PROC_LDP_ENGINE) {
- RB_FOREACH(nbr, nbr_id_head, &nbrs_by_id) {
- if (nbr->af != af)
- continue;
-
- session_shutdown(nbr, S_SHUTDOWN, 0, 0);
- pfkey_remove(nbr);
- nbr->laddr = af_conf->trans_addr;
- nbrp = nbr_params_find(leconf, nbr->id);
- if (nbrp && pfkey_establish(nbr, nbrp) == -1)
- fatalx("pfkey setup failed");
- if (nbr_session_active_role(nbr))
- nbr_establish_connection(nbr);
- }
- }
}
}