Project

General

Profile

« Previous | Next » 

Revision 67c3b863

Added by Justin Sherrill almost 10 years ago

fixes #6382 - revert name change of 48bit mac address regex to fix discovery

View differences:

lib/net/validations.rb
module Validations
IP_REGEXP = /\A((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\.|$)){4}\z/
MAC_REGEXP_48BIT = /\A([a-f0-9]{1,2}:){5}[a-f0-9]{1,2}\z/i
MAC_REGEXP = /\A([a-f0-9]{1,2}:){5}[a-f0-9]{1,2}\z/i
MAC_REGEXP_64BIT = /\A([a-f0-9]{1,2}:){19}[a-f0-9]{1,2}\z/i
HOST_REGEXP = /\A(([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])\.)*([a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])\z/
......
case mac.size
when 17
return true if (mac =~ MAC_REGEXP_48BIT)
return true if (mac =~ MAC_REGEXP)
when 59
return true if (mac =~ MAC_REGEXP_64BIT)
end

Also available in: Unified diff