Skip to content

Commit

Permalink
Skip inet6 addresses matching ::1
Browse files Browse the repository at this point in the history
  • Loading branch information
feld committed Sep 11, 2024
1 parent 38116d1 commit 9ea4383
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/ohai/plugins/freebsd/network.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Check failure on line 71 in lib/ohai/plugins/freebsd/network.rb

View workflow job for this annotation

GitHub Actions / chefstyle

[Correctable] Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
iface[cint][:addresses] ||= Mash.new
if $4.empty?
iface[cint][:addresses][$1] = { "family" => "inet6", "prefixlen" => $3 }
Expand Down

0 comments on commit 9ea4383

Please sign in to comment.