+int
+lb_flush_vip_as (u32 vip_index, u32 as_index)
+{
+ u32 thread_index;
+ vlib_thread_main_t *tm = vlib_get_thread_main();
+ lb_main_t *lbm = &lb_main;
+
+ for(thread_index = 0; thread_index < tm->n_vlib_mains; thread_index++ ) {
+ lb_hash_t *h = lbm->per_cpu[thread_index].sticky_ht;
+ if (h != NULL) {
+ u32 i;
+ lb_hash_bucket_t *b;
+
+ lb_hash_foreach_entry(h, b, i) {
+ if ((vip_index == ~0)
+ || ((b->vip[i] == vip_index) && (as_index == ~0))
+ || ((b->vip[i] == vip_index) && (b->value[i] == as_index)))
+ {
+ vlib_refcount_add(&lbm->as_refcount, thread_index, b->value[i], -1);
+ vlib_refcount_add(&lbm->as_refcount, thread_index, 0, 1);
+ b->vip[i] = ~0;
+ b->value[i] = ~0;
+ }
+ }
+ if (vip_index == ~0)
+ {
+ lb_hash_free(h);
+ lbm->per_cpu[thread_index].sticky_ht = 0;
+ }
+ }
+ }
+
+ return 0;
+}
+
+int lb_vip_del_ass_withlock(u32 vip_index, ip46_address_t *addresses, u32 n,
+ u8 flush)