only process safe_macs if url_filter_kind==safebrowsing
diff --git a/xos/synchronizers/vcpe/steps/sync_vcpetenant.py b/xos/synchronizers/vcpe/steps/sync_vcpetenant.py
index a8c6b4f..266c6b1 100644
--- a/xos/synchronizers/vcpe/steps/sync_vcpetenant.py
+++ b/xos/synchronizers/vcpe/steps/sync_vcpetenant.py
@@ -22,7 +22,6 @@
logger = Logger(level=logging.INFO)
-PARENTAL_MECHANISM="dnsmasq"
ENABLE_QUICK_UPDATE=False
CORD_USE_VTN = getattr(Config(), "networking_use_vtn", False)
@@ -145,13 +144,14 @@
full_setup = True
safe_macs=[]
- if o.volt and o.volt.subscriber:
- for user in o.volt.subscriber.users:
- level = user.get("level",None)
- mac = user.get("mac",None)
- if level in ["G", "PG"]:
- if mac:
- safe_macs.append(mac)
+ if vcpe_service.url_filter_kind == "safebrowsing":
+ if o.volt and o.volt.subscriber:
+ for user in o.volt.subscriber.users:
+ level = user.get("level",None)
+ mac = user.get("mac",None)
+ if level in ["G", "PG"]:
+ if mac:
+ safe_macs.append(mac)
wan_vm_ip=""
wan_vm_mac=""
@@ -218,7 +218,7 @@
url_filter_level = o.volt.subscriber.url_filter_level
url_filter_users = o.volt.subscriber.users
- if PARENTAL_MECHANISM=="broadbandshield":
+ if service.url_filter_kind == "broadbandshield":
# disable url_filter if there are no bbs_addrs
if url_filter_enable and (not fields.get("bbs_addrs",[])):
logger.info("disabling url_filter because there are no bbs_addrs")