diff options
author | Kazuhiro NISHIYAMA <[email protected]> | 2019-09-02 10:02:17 +0900 |
---|---|---|
committer | Kazuhiro NISHIYAMA <[email protected]> | 2019-09-02 12:01:47 +0900 |
commit | 63ab7046a1a5c374a52dfa79406fe52d92d80344 (patch) | |
tree | a62f21ec857e541c5e80ef88dd7ced5fe0390089 /test/socket | |
parent | f58db5a6f5c7b5c2f5f8471adcf8b1fe9577c01a (diff) |
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)
```
Diffstat (limited to 'test/socket')
-rw-r--r-- | test/socket/test_socket.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb index 6cbf3edca8..381b0385e5 100644 --- a/test/socket/test_socket.rb +++ b/test/socket/test_socket.rb @@ -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 |