Make MAC address regex check case insensitive
The regex check for the container MAC address presence in the dnsmasq leases file is case sensitive. Dnsmasq outputs uppercase addresses in the leases file. As MAC addresses are generally considered case insensitive, it makes sense to relax the regular expression check to allow for this.
This commit is contained in:
parent
b210b260b1
commit
6b5c00089d
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ module Vagrant
|
||||||
dnsmasq_leases = read_dnsmasq_leases
|
dnsmasq_leases = read_dnsmasq_leases
|
||||||
@logger.debug "Attempting to load ip from dnsmasq leases (mac: #{mac_address})"
|
@logger.debug "Attempting to load ip from dnsmasq leases (mac: #{mac_address})"
|
||||||
@logger.debug dnsmasq_leases
|
@logger.debug dnsmasq_leases
|
||||||
if dnsmasq_leases =~ /#{Regexp.escape mac_address}\s+([0-9.]+)\s+/
|
if dnsmasq_leases =~ /#{Regexp.escape mac_address}\s+([0-9.]+)\s+/i
|
||||||
ip = $1.to_s
|
ip = $1.to_s
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue