theforeman/foreman · error · Net::Validations::Error
Invalid MAC #{mac}
Error message
Invalid MAC #{mac} What it means
Error "Invalid MAC #{mac}" thrown in theforeman/foreman.
Source
Thrown at app/lib/net/validations.rb:87
def self.multicast_mac?(mac)
return false unless validate_mac(mac)
# Get the first byte
msb = mac.tr('.:-', '').slice(0..1).to_i(16)
# Is least significant bit set?
msb & 0b1 == 1
end
def self.broadcast_mac?(mac)
return false unless validate_mac(mac)
mac.downcase == 'ff:ff:ff:ff:ff:ff'
end
# validates the mac and raises an error
def self.validate_mac!(mac)
raise Error, "Invalid MAC #{mac}" unless validate_mac(mac)
mac
end
# validates the hostname
def self.validate_hostname(hostname)
HOST_REGEXP.match?(hostname)
end
# validates the hostname and raises an error
def self.validate_hostname!(hostname)
raise Error, "Invalid hostname #{hostname}" unless validate_hostname(hostname)
hostname
end
def self.validate_network(network)
validate_ip(network)
end
View on GitHub (pinned to 6b05625475)
When it happens
Trigger: Thrown at app/lib/net/validations.rb:87 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of theforeman/foreman@6b05625475 (2026-08-23).
Data as JSON: /api/errors/dbfea8b9c9fc6a1e.
Report an issue: GitHub.