summaryrefslogtreecommitdiffstats
path: root/src/vnet/dns/dns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/dns/dns.c')
-rw-r--r--src/vnet/dns/dns.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/vnet/dns/dns.c b/src/vnet/dns/dns.c
index bae6cb4911e..471728b8bb7 100644
--- a/src/vnet/dns/dns.c
+++ b/src/vnet/dns/dns.c
@@ -103,8 +103,7 @@ dns_enable_disable (dns_main_t * dm, int is_enable)
if (dm->cache_entry_by_name == 0)
{
if (n_vlib_mains > 1)
- dm->cache_lock = clib_mem_alloc_aligned (CLIB_CACHE_LINE_BYTES,
- CLIB_CACHE_LINE_BYTES);
+ clib_spinlock_init (&dm->cache_lock);
dm->cache_entry_by_name = hash_create_string (0, sizeof (uword));
}