예제 #1
0
/**
 * This function must be called after iprange_add_cidr() to make the
 * changes effective. As this function is costly, it should not be
 * called each time but rather after the complete list of addresses
 * has been added to the database.
 *
 * @param db	the IP range database
 */
void
iprange_sync(struct iprange_db *idb)
{
	iprange_db_check(idb);

	if (idb->tab4_unsorted) {
		sorted_array_sync(idb->tab4, iprange_net4_collision);
		idb->tab4_unsorted = FALSE;
	}
	if (idb->tab6_unsorted) {
		sorted_array_sync(idb->tab6, iprange_net6_collision);
		idb->tab6_unsorted = FALSE;
	}
}
예제 #2
0
/**
 * This function must be called after iprange_add_cidr() to make the
 * changes effective. As this function is costly, it should not be
 * called each time but rather after the complete list of addresses
 * has been added to the database.
 *
 * @param db	the IP range database
 */
void
iprange_sync(struct iprange_db *idb)
{
	iprange_db_check(idb);
	sorted_array_sync(idb->tab, iprange_net_collision);
}