Skip to content

Commit

Permalink
Skip inet6 addresses matching ::1
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Felder <feld@feld.me>
  • Loading branch information
feld committed Oct 10, 2024
1 parent 38116d1 commit cfadfcb
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 cfadfcb

Please sign in to comment.