+ /* Save the cname */
+ vec_add1 (cname, 0);
+ _vec_len (cname) -= 1;
+ ep = pool_elt_at_index (dm->entries, ep_index);
+ ep->cname = cname;
+ ep->flags |= (DNS_CACHE_ENTRY_FLAG_CNAME | DNS_CACHE_ENTRY_FLAG_VALID);
+ /* Save the response */
+ ep->dns_response = reply;
+ /* Set up expiration time */
+ ep->expiration_time = now + clib_net_to_host_u32 (rr->ttl);
+
+ pool_get (dm->entries, next_ep);
+
+ /* Need to recompute ep post pool-get */
+ ep = pool_elt_at_index (dm->entries, ep_index);
+
+ memset (next_ep, 0, sizeof (*next_ep));
+ next_ep->name = vec_dup (cname);
+ vec_add1 (next_ep->name, 0);
+ _vec_len (next_ep->name) -= 1;
+
+ hash_set_mem (dm->cache_entry_by_name, next_ep->name,
+ next_ep - dm->entries);
+
+ /* Use the same server */
+ next_ep->server_rotor = ep->server_rotor;
+ next_ep->server_af = ep->server_af;
+
+ /* Move notification data to the next name in the chain */
+#define _(a) next_ep->a = ep->a; ep->a = 0;
+ foreach_notification_to_move;
+#undef _
+