From bfa6dd2622821961af64224aa59b81c1e8ffbe62 Mon Sep 17 00:00:00 2001 From: Ilija Vukotic Date: Wed, 9 Oct 2024 20:13:06 -0500 Subject: [PATCH] Fix empty IP addresses in enrich_dest.rb and enrich_src.rb filters --- filters/enrich_dest.rb | 4 ++-- filters/enrich_src.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/filters/enrich_dest.rb b/filters/enrich_dest.rb index 29ac200..9eb7fb4 100644 --- a/filters/enrich_dest.rb +++ b/filters/enrich_dest.rb @@ -3,8 +3,8 @@ def get_ips(address) result = { - 'ipv4' => nil, - 'ipv6' => nil + 'ipv4' => '', + 'ipv6' => '' } is_hostname = !Regexp.union([Resolv::IPv4::Regex, Resolv::IPv6::Regex]).match?(address) diff --git a/filters/enrich_src.rb b/filters/enrich_src.rb index dfa23e2..e4dd139 100644 --- a/filters/enrich_src.rb +++ b/filters/enrich_src.rb @@ -3,8 +3,8 @@ def get_ips(address) result = { - 'ipv4' => nil, - 'ipv6' => nil + 'ipv4' => '', + 'ipv6' => '' } is_hostname = !Regexp.union([Resolv::IPv4::Regex, Resolv::IPv6::Regex]).match?(address)