lib/facter/resolvers/windows/networking.rb in facter-4.2.10 vs lib/facter/resolvers/windows/networking.rb in facter-4.2.11
- old
+ new
@@ -69,15 +69,14 @@
IpAdapterAddressesLh.read_list(adapter_addresses) do |adapter_address|
if adapter_down?(adapter_address)
adapter_address = IpAdapterAddressesLh.new(adapter_address[:Next])
next
end
-
if !@fact_list[:domain] || @fact_list[:domain].empty?
- @fact_list[:domain] = adapter_address[:DnsSuffix].read_wide_string_without_length
+ @fact_list[:domain] = adapter_address[:DnsSuffix]
+ .read_wide_string_without_length(replace_invalid_chars: true)
end
-
- name = adapter_address[:FriendlyName].read_wide_string_without_length
+ name = adapter_address[:FriendlyName].read_wide_string_without_length(replace_invalid_chars: true)
net_interface[name] = build_interface_info(adapter_address, name)
end
@fact_list[:interfaces] = net_interface unless net_interface.empty?
end