Hey,
our current MAC address field is just a text box. We do a check in the code base for multicast MAC, broadcast and valid MAC address. A React component could do the unicast and multicast check and display a warning if such a macaddress is entered, so we could remove those validators from Rails as a hard requirement.
Looks like either Dell ships such MACs or users changed it for some reason: Bug #27852: Cannot add host with interface mac address in e3:xx:xx:xx - Foreman
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
Any volunteer to create and implement such a component for Edit NIC form? I will happily review and test the stuff.