Revision f2248acc
Added by Ohad Levy over 12 years ago
- ID f2248accb505ab1736b67c656971656a72c3d93e
lib/proxy/validations.rb | ||
---|---|---|
# validates the mac
|
||
def validate_mac mac
|
||
raise Error, "Invalid MAC #{mac}" unless mac =~ /([a-f0-9]{1,2}:){5}[a-f0-9]{1,2}/i
|
||
mac
|
||
mac.downcase
|
||
end
|
||
|
||
def validate_subnet subnet
|
Also available in: Unified diff
clean up code passing, and removed duplicate code between dhcp server implementations