config->cluster_iam_uptodate = 1;
LOG(0,0,0,0, "Now uptodate with master.\n");
config->cluster_iam_uptodate = 1;
LOG(0,0,0,0, "Now uptodate with master.\n");
- // master lost all slaves, need to handle traffic ourself
- if (bgp_configured && had_peers && !have_peers)
- bgp_enable_routing(1);
- else if (bgp_configured && !had_peers && have_peers)
- bgp_enable_routing(0);
+ // in a cluster, withdraw/add routes when we get a peer/lose all peers
+ if (bgp_configured && have_peers != had_peers)
+ bgp_enable_routing(!have_peers);
config->cluster_undefined_tunnels = 0;
config->cluster_iam_uptodate = 1; // assume all peers are up-to-date
config->cluster_undefined_tunnels = 0;
config->cluster_iam_uptodate = 1; // assume all peers are up-to-date
// FIXME. We need to fix up the tunnel control message
// queue here! There's a number of other variables we
// should also update.
// FIXME. We need to fix up the tunnel control message
// queue here! There's a number of other variables we
// should also update.