summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/ldpd/control.c6
-rw-r--r--usr.sbin/ldpd/control.h5
-rw-r--r--usr.sbin/ldpd/ldpe.c3
-rw-r--r--usr.sbin/ldpd/ldpe.h5
4 files changed, 8 insertions, 11 deletions
diff --git a/usr.sbin/ldpd/control.c b/usr.sbin/ldpd/control.c
index 5c598cd1917..04da144c97e 100644
--- a/usr.sbin/ldpd/control.c
+++ b/usr.sbin/ldpd/control.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.c,v 1.30 2020/06/22 15:09:34 mestre Exp $ */
+/* $OpenBSD: control.c,v 1.31 2021/01/19 15:14:35 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -29,6 +29,8 @@
#include "log.h"
#include "control.h"
+TAILQ_HEAD(ctl_conns, ctl_conn) ctl_conns = TAILQ_HEAD_INITIALIZER(ctl_conns);
+
#define CONTROL_BACKLOG 5
static void control_accept(int, short, void *);
@@ -37,8 +39,6 @@ static struct ctl_conn *control_connbypid(pid_t);
static void control_close(int);
static void control_dispatch_imsg(int, short, void *);
-struct ctl_conns ctl_conns;
-
static int control_fd;
int
diff --git a/usr.sbin/ldpd/control.h b/usr.sbin/ldpd/control.h
index 72a9aa837a6..a47041544c1 100644
--- a/usr.sbin/ldpd/control.h
+++ b/usr.sbin/ldpd/control.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: control.h,v 1.10 2020/06/22 15:09:34 mestre Exp $ */
+/* $OpenBSD: control.h,v 1.11 2021/01/19 15:14:35 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -26,9 +26,6 @@ struct ctl_conn {
TAILQ_ENTRY(ctl_conn) entry;
struct imsgev iev;
};
-TAILQ_HEAD(ctl_conns, ctl_conn);
-
-extern struct ctl_conns ctl_conns;
int control_init(char *);
int control_listen(void);
diff --git a/usr.sbin/ldpd/ldpe.c b/usr.sbin/ldpd/ldpe.c
index 404743ee8d5..0481fcd930f 100644
--- a/usr.sbin/ldpd/ldpe.c
+++ b/usr.sbin/ldpd/ldpe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpe.c,v 1.77 2020/06/22 15:09:34 mestre Exp $ */
+/* $OpenBSD: ldpe.c,v 1.78 2021/01/19 15:14:35 claudio Exp $ */
/*
* Copyright (c) 2013, 2016 Renato Westphal <renato@openbsd.org>
@@ -146,7 +146,6 @@ ldpe(int debug, int verbose, char *sockname)
global.ipv6.ldp_session_socket = -1;
/* listen on ldpd control socket */
- TAILQ_INIT(&ctl_conns);
control_listen();
if ((pkt_ptr = calloc(1, IBUF_READ_SIZE)) == NULL)
diff --git a/usr.sbin/ldpd/ldpe.h b/usr.sbin/ldpd/ldpe.h
index 216c8c7bca6..a2569700dba 100644
--- a/usr.sbin/ldpd/ldpe.h
+++ b/usr.sbin/ldpd/ldpe.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ldpe.h,v 1.77 2019/12/12 00:10:29 yasuoka Exp $ */
+/* $OpenBSD: ldpe.h,v 1.78 2021/01/19 15:14:35 claudio Exp $ */
/*
* Copyright (c) 2013, 2016 Renato Westphal <renato@openbsd.org>
@@ -127,6 +127,8 @@ struct mapping_entry {
struct map map;
};
+struct ctl_conn;
+
struct ldpd_sysdep {
uint8_t no_pfkey;
uint8_t no_md5sig;
@@ -194,7 +196,6 @@ void ldpe_reset_nbrs(int);
void ldpe_reset_ds_nbrs(void);
void ldpe_remove_dynamic_tnbrs(int);
void ldpe_stop_init_backoff(int);
-struct ctl_conn;
void ldpe_iface_ctl(struct ctl_conn *, unsigned int);
void ldpe_adj_ctl(struct ctl_conn *);
void ldpe_nbr_ctl(struct ctl_conn *);