From 0e1e93fe3cd1d86cf8f43a4994e98f03cb769ff0 Mon Sep 17 00:00:00 2001
From: Bombar Maxime <bombar@crans.org>
Date: Sun, 17 May 2020 20:26:18 +0200
Subject: [PATCH] [re2o_lookup] Fix typo.

---
 lookup_plugins/re2oapi.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lookup_plugins/re2oapi.py b/lookup_plugins/re2oapi.py
index ae506e0c..2d461d82 100644
--- a/lookup_plugins/re2oapi.py
+++ b/lookup_plugins/re2oapi.py
@@ -749,15 +749,15 @@ class LookupModule(LookupBase):
 
     def _get_prefix(self, api_client, subnet_name):
         prefixv6 = None
-        if self._is_cached(subnet_name):
+        if self._is_cached(subnet_name + '_v6'):
             display.vvv("Found subnet {} in cache.".format(subnet_name))
-            prefixv6 = self._get_cache(subnet_name)
+            prefixv6 = self._get_cache(subnet_name + '_v6')
         else:
             Mtypes = self._rawquery(api_client, 'machines/iptype')
             iptype = list(filter(lambda x: x['type'] == subnet_name, Mtypes))
             prefixv6 = iptype[0]['prefix_v6'] + '/64'
             display.vvv("Storing subnet {} in cache".format(subnet_name))
-            self._set_cache(subnet_name, prefixv6)
+            self._set_cache(subnet_name + '_v6', prefixv6)
         return prefixv6
 
     def _get_cidrs(self, api_client, subnet_name):