Skip link-local addresses when fixing IPv6 route
This occurs with a Linux host when a link-local address is configured for vboxnet0 (which is the default for VirtualBox 5.2.6). `connect': Invalid argument - connect(2) for "fe80::ffff:ffff:ffff:ffff" port 80 (Errno::EINVAL)
This commit is contained in:
parent
80edb39122
commit
f53238d253
|
@ -43,6 +43,7 @@ module VagrantPlugins
|
|||
# If we have no IPv6, forget it
|
||||
return if !has_v6
|
||||
|
||||
link_local_range = IPAddr.new("fe80::/10")
|
||||
host_only_interfaces(env).each do |interface|
|
||||
next if !present?(interface[:ipv6])
|
||||
next if interface[:status] != "Up"
|
||||
|
@ -50,6 +51,8 @@ module VagrantPlugins
|
|||
ip = IPAddr.new(interface[:ipv6])
|
||||
ip |= ("1" * (128 - interface[:ipv6_prefix].to_i)).to_i(2)
|
||||
|
||||
next if link_local_range.include?(ip)
|
||||
|
||||
@logger.info("testing IPv6: #{ip}")
|
||||
|
||||
begin
|
||||
|
|
Loading…
Reference in New Issue