Skip to content

Commit

Permalink
Do not modify devmap in place in NetworkInterfaces#filter_interfacetype
Browse files Browse the repository at this point in the history
  • Loading branch information
mchf committed May 18, 2016
1 parent 22378e3 commit d85952e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/network/src/modules/NetworkInterfaces.rb
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,8 @@ def CanonicalizeIP(ifcfg)
# - using INTERFACETYPE is reported as a warning by wicked (it asks for reporting a bug)
# - it is often ignored by wicked
def filter_interfacetype(devmap)
devmap.delete_if { |k, v| k == "INTERFACETYPE" && !["lo", "dummy"].include?(v) }
ret = deep_copy(devmap)
ret.delete_if { |k, v| k == "INTERFACETYPE" && !["lo", "dummy"].include?(v) }
end

# Conceal secret information, such as WEP keys, so that the output
Expand Down

0 comments on commit d85952e

Please sign in to comment.