summaryrefslogtreecommitdiff
path: root/ldpd/ldpe.c
diff options
context:
space:
mode:
Diffstat (limited to 'ldpd/ldpe.c')
-rw-r--r--ldpd/ldpe.c28
1 files changed, 25 insertions, 3 deletions
diff --git a/ldpd/ldpe.c b/ldpd/ldpe.c
index c9f0e19076..6c542c5e34 100644
--- a/ldpd/ldpe.c
+++ b/ldpd/ldpe.c
@@ -354,6 +354,7 @@ ldpe_dispatch_main(struct thread *thread)
#ifdef __OpenBSD__
pfkey_remove(nbr);
#endif
+ nbr->auth.method = AUTH_NONE;
}
ldpe_close_sockets(af);
if_update_all(af);
@@ -409,8 +410,11 @@ ldpe_dispatch_main(struct thread *thread)
af))->trans_addr;
#ifdef __OpenBSD__
nbrp = nbr_params_find(leconf, nbr->id);
- if (nbrp && pfkey_establish(nbr, nbrp) == -1)
- fatalx("pfkey setup failed");
+ if (nbrp) {
+ nbr->auth.method = nbrp->auth.method;
+ if (pfkey_establish(nbr, nbrp) == -1)
+ fatalx("pfkey setup failed");
+ }
#endif
if (nbr_session_active_role(nbr))
nbr_establish_connection(nbr);
@@ -642,7 +646,10 @@ ldpe_dispatch_lde(struct thread *thread)
send_notification_full(nbr->tcp, nm);
break;
case IMSG_CTL_END:
- case IMSG_CTL_SHOW_LIB:
+ case IMSG_CTL_SHOW_LIB_BEGIN:
+ case IMSG_CTL_SHOW_LIB_RCVD:
+ case IMSG_CTL_SHOW_LIB_SENT:
+ case IMSG_CTL_SHOW_LIB_END:
case IMSG_CTL_SHOW_L2VPN_PW:
case IMSG_CTL_SHOW_L2VPN_BINDING:
control_imsg_relay(&imsg);
@@ -820,6 +827,21 @@ ldpe_iface_ctl(struct ctl_conn *c, unsigned int idx)
void
ldpe_adj_ctl(struct ctl_conn *c)
{
+ struct adj *adj;
+ struct ctl_adj *actl;
+
+ RB_FOREACH(adj, global_adj_head, &global.adj_tree) {
+ actl = adj_to_ctl(adj);
+ imsg_compose_event(&c->iev, IMSG_CTL_SHOW_DISCOVERY, 0, 0,
+ -1, actl, sizeof(struct ctl_adj));
+ }
+
+ imsg_compose_event(&c->iev, IMSG_CTL_END, 0, 0, -1, NULL, 0);
+}
+
+void
+ldpe_adj_detail_ctl(struct ctl_conn *c)
+{
struct iface *iface;
struct tnbr *tnbr;
struct adj *adj;