diff options
author | remi <remi@cvs.openbsd.org> | 2018-12-27 20:23:25 +0000 |
---|---|---|
committer | remi <remi@cvs.openbsd.org> | 2018-12-27 20:23:25 +0000 |
commit | 7d890ca3830c11c0af1722372e882bbbc2faed09 (patch) | |
tree | d167a3c8808b7b2009015df590aa37b876fd8186 /usr.sbin/bgpd/session.h | |
parent | ecab53f152e5966b095e094c58ab96013f03e381 (diff) |
Check if a control socket or address is already in use befor using it.
If it is used abort startup or let a reload fail.
Sockets are now not unlinked anymore on regular shutdown.
This helps a lot when one tries to do a config check without -n.
Inputs and OK claudio@
Diffstat (limited to 'usr.sbin/bgpd/session.h')
-rw-r--r-- | usr.sbin/bgpd/session.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/session.h b/usr.sbin/bgpd/session.h index 1c87025d7ef..5a90f294236 100644 --- a/usr.sbin/bgpd/session.h +++ b/usr.sbin/bgpd/session.h @@ -1,4 +1,4 @@ -/* $OpenBSD: session.h,v 1.126 2018/12/22 16:12:40 claudio Exp $ */ +/* $OpenBSD: session.h,v 1.127 2018/12/27 20:23:24 remi Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -247,10 +247,11 @@ int carp_demote_set(char *, int); /* config.c */ int merge_config(struct bgpd_config *, struct bgpd_config *, struct peer *); -void prepare_listeners(struct bgpd_config *); +int prepare_listeners(struct bgpd_config *); int get_mpe_label(struct rdomain *); /* control.c */ +int control_check(char *); int control_init(int, char *); int control_listen(int); void control_shutdown(int); |