From 7686dd7fab335c0d441afb034bcccbf27eb7802a Mon Sep 17 00:00:00 2001 From: mpgn Date: Sat, 18 Sep 2021 16:27:14 -0400 Subject: [PATCH] Fix #470 IPv6 local-adress thanks to @bert128 --- cme/parsers/ip.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cme/parsers/ip.py b/cme/parsers/ip.py index f6df17c5..fa00eb96 100755 --- a/cme/parsers/ip.py +++ b/cme/parsers/ip.py @@ -17,7 +17,10 @@ def parse_targets(target): for ip in ip_range: yield str(ip) else: - for ip in ip_network(target, strict=False): - yield str(ip) + if ip_address(target).is_link_local: + yield str(target) + else: + for ip in ip_network(target, strict=False): + yield str(ip) except ValueError: yield str(target)