diff options
Diffstat (limited to 'bgpd/bgpd.c')
-rw-r--r-- | bgpd/bgpd.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c index 31ce5a16..bdc4e289 100644 --- a/bgpd/bgpd.c +++ b/bgpd/bgpd.c @@ -2063,6 +2063,13 @@ bgp_get (struct bgp **bgp_val, as_t *as, const char *name) bgp_router_id_set(bgp, &router_id_zebra); *bgp_val = bgp; + /* Create BGP server socket, if first instance. */ + if (list_isempty(bm->bgp)) + { + if (bgp_socket (bm->port, bm->address) < 0) + return BGP_ERR_INVALID_VALUE; + } + listnode_add (bm->bgp, bgp); return 0; @@ -5342,15 +5349,6 @@ bgp_master_init (void) } -int -bgp_socket_init (void) -{ - /* Create BGP server socket */ - if (bgp_socket (bm->port, bm->address) < 0) - return BGP_ERR_INVALID_VALUE; - return 0; -} - void bgp_init (void) { |