Exemple #1
0
static bool flush(void)
{
	log_debug("Flushing.");
	bib_flush(db);

	memset(session_instances, 0, sizeof(session_instances));
	memset(sessions, 0, sizeof(sessions));
	return test_db();
}
Exemple #2
0
static int handle_pool4_flush(struct xlator *jool, struct genl_info *info,
		union request_pool4 *request)
{
	log_debug("Flushing pool4.");

	pool4db_flush(jool->nat64.pool4);
	if (xlat_is_nat64() && !request->flush.quick) {
		/*
		 * This will also clear *previously* orphaned entries, but given
		 * that "not quick" generally means "please clean up", this is
		 * more likely what people wants.
		 */
		bib_flush(jool);
	}

	return nlcore_respond(info, 0);
}