From 78e7f340f19cd062a71be7893db21461455c74c4 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Wed, 11 Sep 2024 15:17:53 -0400 Subject: [PATCH] Skip inet6 addresses matching ::1 Signed-off-by: Mark Felder --- lib/ohai/plugins/freebsd/network.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ohai/plugins/freebsd/network.rb b/lib/ohai/plugins/freebsd/network.rb index 9ec9498cd..3337ac09b 100644 --- a/lib/ohai/plugins/freebsd/network.rb +++ b/lib/ohai/plugins/freebsd/network.rb @@ -68,6 +68,7 @@ end end if line =~ /\s+inet6 ([a-f0-9\:]+)%?(\w*)\s+prefixlen\s+(\d+)\s*\w*\s*([\da-fx]*)/ + next if $1 == "::1" iface[cint][:addresses] ||= Mash.new if $4.empty? iface[cint][:addresses][$1] = { "family" => "inet6", "prefixlen" => $3 }