aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/socket/test_socket.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/socket/test_socket.rb b/test/socket/test_socket.rb
index 6769576bab..2dfc08a34c 100644
--- a/test/socket/test_socket.rb
+++ b/test/socket/test_socket.rb
@@ -322,6 +322,12 @@ class TestSocket < Test::Unit::TestCase
}
ip_addrs.each {|ai|
+ if /linux/ =~ RUBY_PLATFORM && ai.ip_address.include?('%') &&
+ (`uname -r`[/[0-9.]+/].split('.').map(&:to_i) <=> [2,6,18]) <= 0
+ # Cent OS 5.6 (2.6.18-238.19.1.el5xen) doesn't correctly work
+ # sendmsg with pktinfo for link-local ipv6 addresses
+ next
+ end
Addrinfo.udp(ai.ip_address, port).connect {|s|
msg1 = "<<<#{ai.inspect}>>>"
s.sendmsg msg1