summaryrefslogtreecommitdiffstats
path: root/proto/bgp/bgp.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-09-24 22:12:11 +0200
committerOndrej Zajicek <santiago@crfreenet.org>2009-09-24 22:12:11 +0200
commitbe6e39ebbf7ed107abde6fc1a18e8827ca47a7c1 (patch)
treea832ae3fd3377930b0f7703e14d3452f9ae3f0fc /proto/bgp/bgp.c
parent2d507e64b7d7029906aac30dbea317795b5339de (diff)
downloadbird-be6e39ebbf7ed107abde6fc1a18e8827ca47a7c1.tar
bird-be6e39ebbf7ed107abde6fc1a18e8827ca47a7c1.zip
Passive option.
Diffstat (limited to 'proto/bgp/bgp.c')
-rw-r--r--proto/bgp/bgp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c
index 0c8ee6d..af5dbfc 100644
--- a/proto/bgp/bgp.c
+++ b/proto/bgp/bgp.c
@@ -120,7 +120,9 @@ bgp_startup(struct bgp_proto *p)
{
BGP_TRACE(D_EVENTS, "Started");
p->start_state = p->cf->capabilities ? BSS_CONNECT : BSS_CONNECT_NOCAP;
- bgp_active(p);
+
+ if (!p->cf->passive)
+ bgp_active(p);
}
static void
@@ -292,7 +294,8 @@ bgp_decision(void *vp)
DBG("BGP: Decision start\n");
if ((p->p.proto_state == PS_START)
- && (p->outgoing_conn.state == BS_IDLE))
+ && (p->outgoing_conn.state == BS_IDLE)
+ && (!p->cf->passive))
bgp_active(p);
if ((p->p.proto_state == PS_STOP)