summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bgpd/bgpd.c4
-rw-r--r--bgpd/bgpd.h1
2 files changed, 4 insertions, 1 deletions
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
index bdc4e289..69c8c0a3 100644
--- a/bgpd/bgpd.c
+++ b/bgpd/bgpd.c
@@ -82,6 +82,7 @@ bgp_option_set (int flag)
case BGP_OPT_NO_FIB:
case BGP_OPT_MULTIPLE_INSTANCE:
case BGP_OPT_CONFIG_CISCO:
+ case BGP_OPT_NO_LISTEN:
SET_FLAG (bm->options, flag);
break;
default:
@@ -2064,7 +2065,8 @@ bgp_get (struct bgp **bgp_val, as_t *as, const char *name)
*bgp_val = bgp;
/* Create BGP server socket, if first instance. */
- if (list_isempty(bm->bgp))
+ if (list_isempty(bm->bgp)
+ && !bgp_option_check (BGP_OPT_NO_LISTEN))
{
if (bgp_socket (bm->port, bm->address) < 0)
return BGP_ERR_INVALID_VALUE;
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
index bb307160..63e326af 100644
--- a/bgpd/bgpd.h
+++ b/bgpd/bgpd.h
@@ -59,6 +59,7 @@ struct bgp_master
#define BGP_OPT_NO_FIB (1 << 0)
#define BGP_OPT_MULTIPLE_INSTANCE (1 << 1)
#define BGP_OPT_CONFIG_CISCO (1 << 2)
+#define BGP_OPT_NO_LISTEN (1 << 3)
};
/* BGP instance structure. */