Skip POINTOPOINT of IPv4 too instead of IPv6 only

Fix following error on `utun*`:
```
  1) Error:
TestSocket#test_udp_server:
Errno::ECONNREFUSED: Connection refused - recvmsg(2)
```
This commit is contained in:
Kazuhiro NISHIYAMA 2019-09-02 10:02:17 +09:00
parent f58db5a6f5
commit 63ab7046a1
No known key found for this signature in database
GPG Key ID: 262ED8DBB4222F7A

View File

@ -380,11 +380,10 @@ class TestSocket < Test::Unit::TestCase
in6_ifreq = [ifr_name,ai.to_sockaddr].pack('a16A*')
s.ioctl(ulSIOCGIFFLAGS, in6_ifreq)
next true if in6_ifreq.unpack('A16L1').last & ulIFF_POINTOPOINT != 0
else
ifconfig ||= `/sbin/ifconfig`
next true if ifconfig.scan(/^(\w+):(.*(?:\n\t.*)*)/).find do|ifname, value|
value.include?(ai.ip_address) && value.include?('POINTOPOINT')
end
end
ifconfig ||= `/sbin/ifconfig`
next true if ifconfig.scan(/^(\w+):(.*(?:\n\t.*)*)/).find do |_ifname, value|
value.include?(ai.ip_address) && value.include?('POINTOPOINT')
end
end
false