From 22b2c1759acb83166735e88ce5b60347547b7a40 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Wed, 5 Oct 2022 14:22:37 -0400 Subject: [PATCH] cms_net.wolmatch: Only send to MAC addresses with valid length --- _runners/cms_net.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_runners/cms_net.py b/_runners/cms_net.py index 1d73d38..6ec6ae8 100644 --- a/_runners/cms_net.py +++ b/_runners/cms_net.py @@ -32,9 +32,9 @@ def wolmatch(tgt, destport=9): continue # NOTE: FIVE, NINE, and TEN all should have eth addr as well, why is there only one printed? for iface, mac in minion['hwaddr_interfaces'].items(): - if iface == 'lo' or mac == ':::::': - continue mac = mac.strip() + if iface == 'lo' or len(mac) != len("00:00:00:00:00:00"): + continue #print(name, iface, mac, minion['ip_interfaces']) wol(mac, destport=destport) log.info('Waking up %s', mac)