summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_network.h
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2009-07-22 01:27:21 +0200
committerPaul Jakma <paul@quagga.net>2009-07-28 11:04:38 +0200
commitd023aec49f70156d2ed894a8fba65bcfa221ff02 (patch)
tree00ab5d69481c212b6ed2f350c5a5c7f430ef9208 /bgpd/bgp_network.h
parentbgpd: peer action table static/const (diff)
downloadfrr-d023aec49f70156d2ed894a8fba65bcfa221ff02.tar.xz
frr-d023aec49f70156d2ed894a8fba65bcfa221ff02.zip
bgpd: start listener on first instance
Start BGP listener only after first instance is started. This helps the security if BGP is not used but daemon is started. It also addresses some issues like MD5 not working on listener unless IPV6 configured (because listener was not in list); as well as compiler warnings. * bgp_network.c: (bgp_listener) listen socket creation consolidated here (bgp_socket) Use bgp_listener * bgpd.c: (bgp_get) call bgp_socket on creation of first struct bgp. (bgp_init) remove bgp_socket call. * memtypes.c: Add MTYPE_BGP_LISTENER
Diffstat (limited to 'bgpd/bgp_network.h')
-rw-r--r--bgpd/bgp_network.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/bgpd/bgp_network.h b/bgpd/bgp_network.h
index 618d8dbb2..5bf2e5ff1 100644
--- a/bgpd/bgp_network.h
+++ b/bgpd/bgp_network.h
@@ -21,7 +21,8 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#ifndef _QUAGGA_BGP_NETWORK_H
#define _QUAGGA_BGP_NETWORK_H
-extern int bgp_socket (struct bgp *, unsigned short, char *);
+extern int bgp_socket (unsigned short, const char *);
+extern void bgp_close (void);
extern int bgp_connect (struct peer *);
extern void bgp_getsockname (struct peer *);